# transform

> The Transform of the incoming object involved in the collision.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public Transform transform { get; }
```

### Remarks

Additional Resources: [Transform](/engine/6000.7/script-reference/unityengine/transform.md)

### Examples

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void OnCollisionEnter2D(Collision2D collision2D)
    {
        //If the object we collided with was an Asteroid.
        if (collision2D.transform.name == "Asteroid")
        {
            //Sets this object as the new parent of the Transform of the object involved in the collision.
            collision2D.transform.SetParent(gameObject.transform);
        }
    }
}
```
