The PlayMode
property of the Editor.EditorScene
class is a static string that represents the current play mode state of the editor scene. This property is used to determine whether the editor is in play mode or edit mode.
The PlayMode
property of the Editor.EditorScene
class is a static string that represents the current play mode state of the editor scene. This property is used to determine whether the editor is in play mode or edit mode.
To access the current play mode state, you can simply reference the PlayMode
property directly from the Editor.EditorScene
class. This property is static, so it does not require an instance of the class to be accessed.
// Example of accessing the PlayMode property string currentPlayMode = Editor.EditorScene.PlayMode; // Check if the editor is in play mode if (currentPlayMode == "Play") { // Perform actions specific to play mode } else { // Perform actions specific to edit mode }