Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    SceneInstance Class

    Namespace: Stride.Engine
    Assembly: Stride.Engine.dll

    Manage a collection of entities within a RootScene.

    System.Object → DisposeBase → ComponentBase → EntityManager → SceneInstance
    Derived from SceneInstance:

    public sealed class SceneInstance : EntityManager, IDisposable, IComponent, IReferencable, ICollectorHolder, IReadOnlySet<Entity>, IReadOnlyCollection<Entity>, IEnumerable<Entity>, IEnumerable
    Name Description
    Constructors
    SceneInstance(IServiceRegistry)

    Initializes a new instance of the EntityManager class.

    SceneInstance(IServiceRegistry, Scene, ExecutionMode)

    Initializes a new instance of the SceneInstance class.

    Fields
    Current

    A property key to get the current scene from the .

    CurrentRenderSystem

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

    CurrentVisibilityGroup

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

    Properties
    RootScene

    Gets the scene.

    VisibilityGroups
    Methods
    Destroy()
    GetCurrent(RenderContext)

    Gets the current scene valid only from a rendering context. May be null.

    Events
    RootSceneChanged

    Occurs when the scene changed from a scene child component.

    | Improve this Doc View Source

    Constructors


    SceneInstance(IServiceRegistry)

    Initializes a new instance of the EntityManager class.

    public SceneInstance(IServiceRegistry registry)
    Parameters
    Type Name Description
    IServiceRegistry registry

    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
    Type Name Description
    IServiceRegistry services

    The services.

    Scene rootScene

    The scene entity root.

    ExecutionMode executionMode

    The mode that determines which processors are executed.

    Exceptions
    Type Condition
    System.ArgumentNullException

    services or rootScene

    | Improve this Doc View Source

    Fields


    Current

    A property key to get the current scene from the .

    public static readonly PropertyKey<SceneInstance> Current
    Field Value
    Type Description
    PropertyKey<SceneInstance>

    CurrentRenderSystem

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

    public static readonly PropertyKey<RenderSystem> CurrentRenderSystem
    Field Value
    Type Description
    PropertyKey<RenderSystem>

    CurrentVisibilityGroup

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

    public static readonly PropertyKey<VisibilityGroup> CurrentVisibilityGroup
    Field Value
    Type Description
    PropertyKey<VisibilityGroup>
    | Improve this Doc View Source

    Properties


    RootScene

    Gets the scene.

    public Scene RootScene { get; set; }
    Property Value
    Type Description
    Scene

    The scene.


    VisibilityGroups

    public TrackingCollection<VisibilityGroup> VisibilityGroups { get; }
    Property Value
    Type Description
    TrackingCollection<VisibilityGroup>
    | Improve this Doc View Source

    Methods


    Destroy()

    protected override void Destroy()
    Overrides
    ComponentBase.Destroy()

    GetCurrent(RenderContext)

    Gets the current scene valid only from a rendering context. May be null.

    public static SceneInstance GetCurrent(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context

    The context.

    Returns
    Type Description
    SceneInstance

    Stride.Engine.SceneInstance.

    | Improve this Doc View Source

    Events


    RootSceneChanged

    Occurs when the scene changed from a scene child component.

    public event EventHandler<EventArgs> RootSceneChanged
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    Inherited Members

    EntityManager.ExecutionMode
    EntityManager.EntityAdded
    EntityManager.EntityRemoved
    EntityManager.HierarchyChanged
    EntityManager.ComponentTypeAdded
    EntityManager.ComponentChanged
    EntityManager.Services
    EntityManager.Processors
    EntityManager.Count
    EntityManager.ComponentTypes
    EntityManager.Update(GameTime)
    EntityManager.Contains(Entity)
    EntityManager.GetEnumerator()
    EntityManager.GetProcessor<TProcessor>()
    EntityManager.Remove(Entity)
    EntityManager.Reset()
    EntityManager.Draw(RenderContext)
    EntityManager.IEnumerable<Entity>.GetEnumerator()
    EntityManager.IEnumerable.GetEnumerator()
    EntityManager.OnComponentTypeAdded(TypeInfo)
    EntityManager.OnEntityAdded(Entity)
    EntityManager.OnEntityRemoved(Entity)
    EntityManager.OnComponentChanged(Entity, Int32, EntityComponent, EntityComponent)
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    EnumerableExtensions.IsNullOrEmpty(IEnumerable)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    EnumerableExtensions.LastIndexOf<T>(IEnumerable<T>, Func<T, Boolean>)
    EnumerableExtensions.NotNull<T>(IEnumerable<T>)
    EnumerableExtensions.ToHashCode<T>(IEnumerable<T>)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation