Class SceneModule
Scenes and actors management module.
Inheritance
Namespace: FlaxEditor.Modules
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class SceneModule : EditorModule
Fields
Root
The root tree node for the whole scene graph.
Declaration
public SceneModule.ScenesRootNode Root
Field Value
SceneModule.ScenesRootNode
|
Methods
CheckSaveBeforeClose()
Show save before scene load/unload action.
Declaration
public bool CheckSaveBeforeClose()
Returns
System.Boolean
True if action has been canceled, otherwise false |
CheckSaveBeforeClose(SceneNode)
Show save before scene load/unload action.
Declaration
public bool CheckSaveBeforeClose(SceneNode scene)
Parameters
FlaxEditor.SceneGraph.Actors.SceneNode
scene
The scene that will be closed. |
Returns
System.Boolean
True if action has been canceled, otherwise false |
ClearRefsToSceneObjects(Boolean)
Clears references to the scene objects by the editor. Deselects objects.
Declaration
public void ClearRefsToSceneObjects(bool fullCleanup = false)
Parameters
System.Boolean
fullCleanup
True if cleanup all data (including serialized and cached data). Otherwise will just clear living references to the scene objects. |
CloseAllScenes()
Closes all opened scene (async).
Declaration
public void CloseAllScenes()
CloseAllScenesExcept(Scene)
Closes all of the scenes except for the specified scene (async).
Declaration
public void CloseAllScenesExcept(Scene scene)
Parameters
Scene
scene
The scene to not close. |
CloseScene(Scene)
Closes scene (async).
Declaration
public void CloseScene(Scene scene)
Parameters
Scene
scene
The scene. |
CreateSceneFile(String)
Creates the new scene file. The default scene contains set of simple actors.
Declaration
public void CreateSceneFile(string path)
Parameters
System.String
path
The path. |
ExecuteOnGraph(SceneGraphTools.GraphExecuteCallbackDelegate)
Executes the custom action on the graph nodes.
Declaration
public void ExecuteOnGraph(SceneGraphTools.GraphExecuteCallbackDelegate callback)
Parameters
FlaxEditor.SceneGraph.SceneGraphTools.GraphExecuteCallbackDelegate
callback
The callback. |
GetActorNode(Actor)
Gets the actor node.
Declaration
public ActorNode GetActorNode(Actor actor)
Parameters
Actor
actor
The actor. |
Returns
FlaxEditor.SceneGraph.ActorNode
Found actor node or null if missing. Actor may not be linked to the scene tree so node won't be found in that case. |
GetActorNode(Guid)
Gets the actor node.
Declaration
public ActorNode GetActorNode(Guid actorId)
Parameters
System.Guid
actorId
The actor id. |
Returns
FlaxEditor.SceneGraph.ActorNode
Found actor node or null if missing. Actor may not be linked to the scene tree so node won't be found in that case. |
IsEdited()
Determines whether any scene is edited.
Declaration
public bool IsEdited()
Returns
System.Boolean
|
IsEdited(Scene)
Determines whether the specified scene is edited.
Declaration
public bool IsEdited(Scene scene)
Parameters
Scene
scene
The scene. |
Returns
System.Boolean
|
IsEverySceneEdited()
Determines whether every scene is edited.
Declaration
public bool IsEverySceneEdited()
Returns
System.Boolean
|
MarkAllScenesEdited()
Marks all the scenes as modified.
Declaration
public void MarkAllScenesEdited()
MarkSceneEdited(SceneNode)
Marks the scene as modified.
Declaration
public void MarkSceneEdited(SceneNode scene)
Parameters
FlaxEditor.SceneGraph.Actors.SceneNode
scene
The scene. |
MarkSceneEdited(Scene)
Marks the scene as modified.
Declaration
public void MarkSceneEdited(Scene scene)
Parameters
Scene
scene
The scene. |
MarkSceneEdited(IEnumerable<Scene>)
Marks the scenes as modified.
Declaration
public void MarkSceneEdited(IEnumerable<Scene> scenes)
Parameters
System.Collections.Generic.IEnumerable<Scene>
scenes
The scenes. |
OnExit()
Declaration
public override void OnExit()
Overrides
OnInit()
Declaration
public override void OnInit()
Overrides
OpenScene(Guid, Boolean)
Opens scene (async).
Declaration
public void OpenScene(Guid sceneId, bool additive = false)
Parameters
System.Guid
sceneId
Scene ID |
System.Boolean
additive
True if don't close opened scenes and just add new scene to them, otherwise will release current scenes and load single one. |
ReloadScenes()
Reload all loaded scenes.
Declaration
public void ReloadScenes()
SaveScene(SceneNode)
Saves scene (async).
Declaration
public void SaveScene(SceneNode scene)
Parameters
FlaxEditor.SceneGraph.Actors.SceneNode
scene
Scene to save. |
SaveScene(Scene)
Saves scene (async).
Declaration
public void SaveScene(Scene scene)
Parameters
Scene
scene
Scene to save. |
SaveScenes()
Saves all open scenes (async).
Declaration
public void SaveScenes()
Events
ActorRemoved
Occurs when actor gets removed. Editor and all submodules should remove references to that actor.
Declaration
public event Action<ActorNode> ActorRemoved
Event Type
System.Action<FlaxEditor.SceneGraph.ActorNode>
|