Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PreviewSceneStage

The PreviewSceneStage class represents an editing context based on a single preview Scene.
Read time 5 minutesLast updated 10 days ago

Definition

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

sceneThe preview Scene this stage controls. Stage content should be moved into this Scene.
stageHandleSee Stage.stageHandle.

Methods

Method

Description

OnCloseStageUnity calls this method when the Stage is closed. Classes that inherit from PreviewSceneStage should implement cleanup logic in this method.
OnOpenStageUnity calls this method when the Stage is opened. Classes that inherit from PreviewSceneStage should implement initialization logic in this method.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.