# SetLocalPositionAndRotation(Vector3, Quaternion)

> Sets the position and rotation of the Transform component in local space (i.e. relative to its parent transform).

## Definition

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

```csharp
public void SetLocalPositionAndRotation(Vector3 localPosition, Quaternion localRotation)
```

### Parameters

**** (\[Vector3]\(/engine/6000.7/script-reference/unityengine/vector3)): The local space position to apply to the transform.**** (\[Quaternion]\(/engine/6000.7/script-reference/unityengine/quaternion)): The local space rotation to apply to the transform.

### Remarks

When setting both the position and rotation of a transform, calling this method is slightly more efficient than assigning to [Transform.localPosition](/engine/6000.7/script-reference/unityengine/transform/localposition.md) and [Transform.localRotation](/engine/6000.7/script-reference/unityengine/transform/localrotation.md) individually.

If the transform has no parent, then calling this is equivalent to calling [Transform.SetPositionAndRotation](/engine/6000.7/script-reference/unityengine/transform/setpositionandrotation.md).
