Class Stage
Inheritance
Namespace: UnityEditor.Rendering.LookDev
Syntax
public class Stage : IDisposable
Constructors
Stage(String)
Construct a new stage to let your object live. A stage is a scene with visibility isolation.
Declaration
public Stage(string sceneName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sceneName | Name of the scene used. |
Properties
camera
Get access to the stage's camera
Declaration
public Camera camera { get; }
Property Value
Type | Description |
---|---|
Camera |
runtimeInterface
Declaration
public StageRuntimeInterface runtimeInterface { get; }
Property Value
Type | Description |
---|---|
StageRuntimeInterface |
scene
Get access to the stage's scene
Declaration
public Scene scene { get; }
Property Value
Type | Description |
---|---|
Scene |
Methods
Clear(Boolean)
Clear all scene object except camera.
Declaration
public void Clear(bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | persistent | [OPTIONAL] If true, clears also persistent objects. Default value: false. |
CreateGameObjectIntoStage(Boolean)
Create a GameObject into the stage.
Declaration
public GameObject CreateGameObjectIntoStage(bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | persistent | [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false. |
Returns
Type | Description |
---|---|
GameObject | The created GameObject |
Dispose()
Clear and close the stage's scene.
Declaration
public void Dispose()
Finalize()
Declaration
protected void Finalize()
InstantiateIntoStage(GameObject, Boolean)
Instantiate a scene GameObject or a prefab into the stage's scene. It is instantiated at origin.
Declaration
public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
GameObject | prefabOrSceneObject | The element to instantiate |
System.Boolean | persistent | [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false. |
Returns
Type | Description |
---|---|
GameObject | The instance |
See Also
InstantiateIntoStage(GameObject, Vector3, Quaternion, Boolean)
Instantiate a scene GameObject or a prefab into the stage's scene at a specific position and rotation.
Declaration
public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, Vector3 position, Quaternion rotation, bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
GameObject | prefabOrSceneObject | The element to instantiate |
Vector3 | position | The new world position |
Quaternion | rotation | The new world rotation |
System.Boolean | persistent | [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false. |
Returns
Type | Description |
---|---|
GameObject | The instance |
See Also
MoveIntoStage(GameObject, Boolean)
Move a GameObject into the stage's scene at origin.
Declaration
public void MoveIntoStage(GameObject gameObject, bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | The gameObject to move. |
System.Boolean | persistent | [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false. |
See Also
MoveIntoStage(GameObject, Vector3, Quaternion, Boolean)
Move a GameObject into the stage's scene at specific position and rotation.
Declaration
public void MoveIntoStage(GameObject gameObject, Vector3 position, Quaternion rotation, bool persistent = false)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | The gameObject to move. |
Vector3 | position | The new world position |
Quaternion | rotation | The new world rotation |
System.Boolean | persistent | [OPTIONAL] If true, the object is not recreated with the scene update. Default value: false. |
See Also
SetGameObjectVisible(Boolean)
Changes stage scene's objects visibility.
Declaration
public void SetGameObjectVisible(bool visible)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | visible | True: make them visible. False: hide them. |