Table of Contents

Class SceneInstance

Namespace
Stride.Engine
Assembly
Stride.Engine.dll

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
SceneInstance
Implements
Inherited Members
Extension Methods

Constructors

SceneInstance(IServiceRegistry)

Initializes a new instance of the EntityManager class.

public SceneInstance(IServiceRegistry registry)

Parameters

registry IServiceRegistry

The registry.

SceneInstance(IServiceRegistry, Scene, ExecutionMode)

Initializes a new instance of the SceneInstance class.

public SceneInstance(IServiceRegistry services, Scene rootScene, ExecutionMode executionMode = ExecutionMode.Runtime)

Parameters

services IServiceRegistry

The services.

rootScene Scene

The scene entity root.

executionMode ExecutionMode

The mode that determines which processors are executed.

Exceptions

ArgumentNullException

services or rootScene

Fields

Current

A property key to get the current scene from the RenderContext.Tags.

public static readonly PropertyKey<SceneInstance> Current

Field Value

PropertyKey<SceneInstance>

CurrentRenderSystem

A property key to get the current render system from the RenderContext.Tags.

public static readonly PropertyKey<RenderSystem> CurrentRenderSystem

Field Value

PropertyKey<RenderSystem>

CurrentVisibilityGroup

A property key to get the current visibility group from the RenderContext.Tags.

public static readonly PropertyKey<VisibilityGroup> CurrentVisibilityGroup

Field Value

PropertyKey<VisibilityGroup>

Properties

RootScene

Gets the scene.

public Scene RootScene { get; set; }

Property Value

Scene

The scene.

VisibilityGroups

public TrackingCollection<VisibilityGroup> VisibilityGroups { get; }

Property Value

TrackingCollection<VisibilityGroup>

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

context RenderContext

The context.

Returns

SceneInstance

Stride.Engine.SceneInstance.

Events

RootSceneChanged

Occurs when the scene changed from a scene child component.

public event EventHandler<EventArgs> RootSceneChanged

Event Type

EventHandler<EventArgs>