Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LookAt

Moves the Scene view to focus on a target.
Read time 2 minutesLast updated 9 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

LookAt(Vector3)

Moves the Scene view to focus on a target.
public void LookAt(Vector3 point)

Parameters

point

The position in world space to frame.

LookAt(Vector3, Quaternion)

Moves the Scene view to focus on a target.
public void LookAt(Vector3 point, Quaternion direction)

Parameters

point

The position in world space to frame.

direction

The direction that the Scene view should view the target point from.

LookAt(Vector3, Quaternion, float)

Moves the Scene view to focus on a target.
public void LookAt(Vector3 point, Quaternion direction, float newSize)

Parameters

point

The position in world space to frame.

direction

The direction that the Scene view should view the target point from.

newSize

The amount of camera zoom. Sets SceneView.size.

LookAt(Vector3, Quaternion, float, bool)

Moves the Scene view to focus on a target.
public void LookAt(Vector3 point, Quaternion direction, float newSize, bool ortho)

Parameters

point

The position in world space to frame.

direction

The direction that the Scene view should view the target point from.

newSize

The amount of camera zoom. Sets SceneView.size.

ortho

Whether the camera focus is in orthographic mode (true) or perspective mode (false).

LookAt(Vector3, Quaternion, float, bool, bool)

Moves the Scene view to focus on a target.
public void LookAt(Vector3 point, Quaternion direction, float newSize, bool ortho, bool instant)

Parameters

point

The position in world space to frame.

direction

The direction that the Scene view should view the target point from.

newSize

The amount of camera zoom. Sets SceneView.size.

ortho

Whether the camera focus is in orthographic mode (true) or perspective mode (false).

instant

Apply the movement immediately (true) or animate the transition (false).