Class SceneInstance
Manage a collection of entities within a RootScene.
public sealed class SceneInstance : EntityManager, IDisposable, IComponent, IReferencable, ICollectorHolder, IReadOnlySet<Entity>, IReadOnlyCollection<Entity>, IEnumerable<Entity>, IEnumerable
  - Inheritance
 - 
      objectSceneInstance
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
SceneInstance(IServiceRegistry)
Initializes a new instance of the EntityManager class.
public SceneInstance(IServiceRegistry registry)
  Parameters
registryIServiceRegistryThe registry.
SceneInstance(IServiceRegistry, Scene, ExecutionMode)
Initializes a new instance of the SceneInstance class.
public SceneInstance(IServiceRegistry services, Scene rootScene, ExecutionMode executionMode = ExecutionMode.Runtime)
  Parameters
servicesIServiceRegistryThe services.
rootSceneSceneThe scene entity root.
executionModeExecutionModeThe mode that determines which processors are executed.
Exceptions
- ArgumentNullException
 services or rootScene
Fields
Current
A property key to get the current scene from the Tags.
public static readonly PropertyKey<SceneInstance> Current
  Field Value
CurrentRenderSystem
A property key to get the current render system from the Tags.
public static readonly PropertyKey<RenderSystem> CurrentRenderSystem
  Field Value
CurrentVisibilityGroup
A property key to get the current visibility group from the Tags.
public static readonly PropertyKey<VisibilityGroup> CurrentVisibilityGroup
  Field Value
Properties
RootScene
Gets the scene.
public Scene RootScene { get; set; }
  Property Value
- Scene
 The scene.
VisibilityGroups
public TrackingCollection<VisibilityGroup> VisibilityGroups { get; }
  Property Value
Methods
Destroy()
Disposes of object resources.
protected override void Destroy()
  GetCurrent(RenderContext)
Gets the current scene valid only from a rendering context. May be null.
public static SceneInstance GetCurrent(RenderContext context)
  Parameters
contextRenderContextThe context.
Returns
- SceneInstance
 Stride.Engine.SceneInstance.
Events
RootSceneChanged
Occurs when the scene changed from a scene child component.
public event EventHandler<EventArgs> RootSceneChanged