PreviewSceneStage
The PreviewSceneStage class represents an editing context based on a single preview Scene.
Read time 5 minutesLast updated 10 days ago
Definition
- Type: Class
- Namespace: UnityEditor.SceneManagement
- Assembly: UnityEditor.CoreModule
- Inherits from: Stage
public abstract class PreviewSceneStage : Stage
Remarks
You can create a custom type of Stage by implementing a class that inherits from the abstract PreviewSceneStage class. Your custom Stage should ensure any content it controls is moved into the preview Scene that the stage controls.
Your custom Stage class should implement PreviewSceneStage.OnOpenStage and PreviewSceneStage.OnCloseStage. Unity calls those methods when your stage is opened and closed; you should not call them yourself. To open a Stage of your custom type, use StageUtility.GoToStage.
Properties
Property | Description |
|---|---|
| scene | The preview Scene this stage controls. Stage content should be moved into this Scene. |
| stageHandle | See Stage.stageHandle. |
Methods
Method | Description |
|---|---|
| OnCloseStage | Unity calls this method when the Stage is closed. Classes that inherit from PreviewSceneStage should implement cleanup logic in this method. |
| OnOpenStage | Unity calls this method when the Stage is opened. Classes that inherit from PreviewSceneStage should implement initialization logic in this method. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |