Class SceneSystem | Entities | 0.10.0-preview.6
docs.unity3d.com
Entities 0.10.0-preview.6
    Show / Hide Table of Contents

    Class SceneSystem

    Inheritance
    Object
    ComponentSystemBase
    ComponentSystem
    SceneSystem
    Inherited Members
    ComponentSystem.PostUpdateCommands
    ComponentSystem.InitEntityQueryCache(Int32)
    ComponentSystem.Entities
    ComponentSystem.Update()
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.Time
    ComponentSystemBase.OnCreateForCompiler()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.OnDestroy()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetArchetypeChunkComponentType<T>(Boolean)
    ComponentSystemBase.GetArchetypeChunkComponentTypeDynamic(ComponentType)
    ComponentSystemBase.GetArchetypeChunkBufferType<T>(Boolean)
    ComponentSystemBase.GetArchetypeChunkSharedComponentType<T>()
    ComponentSystemBase.GetArchetypeChunkEntityType()
    ComponentSystemBase.GetComponentDataFromEntity<T>(Boolean)
    ComponentSystemBase.GetBufferFromEntity<T>(Boolean)
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.GetEntityQuery(ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(EntityQueryDesc[])
    Namespace: Unity.Scenes
    Syntax
    [UpdateInGroup(typeof(SceneSystemGroup))]
    public class SceneSystem : ComponentSystem

    Fields

    k_SceneInfoFileName

    Declaration
    public const string k_SceneInfoFileName = "catalog.bin"
    Field Value
    Type Description
    String

    sceneLoadRequestArchetype

    Declaration
    protected EntityArchetype sceneLoadRequestArchetype
    Field Value
    Type Description
    EntityArchetype

    sceneLoadRequestQuery

    Declaration
    protected EntityQuery sceneLoadRequestQuery
    Field Value
    Type Description
    EntityQuery

    Properties

    BuildConfigurationGUID

    Declaration
    public Hash128 BuildConfigurationGUID { get; set; }
    Property Value
    Type Description
    Hash128

    Methods

    GetSceneEntity(Hash128)

    Find the scene given a guid. For GameObject scenes, this will only return the first matching scene.

    Declaration
    public Entity GetSceneEntity(Hash128 sceneGUID)
    Parameters
    Type Name Description
    Hash128 sceneGUID

    The guid of the scene.

    Returns
    Type Description
    Entity

    The entity for the scene.

    GetSceneGUID(String)

    Get the guid for a scene path or name. This is a slow method - it is best to use the guid directly.

    Declaration
    public Hash128 GetSceneGUID(string scenePath)
    Parameters
    Type Name Description
    String scenePath

    The scene path or name.

    Returns
    Type Description
    Hash128

    True if the scene guid exists.

    IsSceneLoaded(Entity)

    Check if a scene or subscene is loaded.

    Declaration
    public bool IsSceneLoaded(Entity entity)
    Parameters
    Type Name Description
    Entity entity

    The entity with the loading component data. This is the entity returned by LoadSceneAsync.

    Returns
    Type Description
    Boolean

    True if the scene is loaded.

    LoadSceneAsync(Hash128, SceneSystem.LoadParameters)

    Load a scene by its asset GUID.

    Declaration
    public Entity LoadSceneAsync(Hash128 sceneGUID, SceneSystem.LoadParameters parameters = default(SceneSystem.LoadParameters))
    Parameters
    Type Name Description
    Hash128 sceneGUID

    The guid of the scene.

    SceneSystem.LoadParameters parameters

    The load parameters for the scene.

    Returns
    Type Description
    Entity

    An entity representing the loading state of the scene.

    OnCreate()

    Declaration
    protected override void OnCreate()
    Overrides
    ComponentSystemBase.OnCreate()

    OnUpdate()

    Declaration
    protected override void OnUpdate()
    Overrides
    ComponentSystem.OnUpdate()

    UnloadScene(Entity, SceneSystem.UnloadParameters)

    Unload the scene.

    Declaration
    public void UnloadScene(Entity sceneEntity, SceneSystem.UnloadParameters unloadParams = SceneSystem.UnloadParameters.Default)
    Parameters
    Type Name Description
    Entity sceneEntity

    The entity for the scene.

    SceneSystem.UnloadParameters unloadParams

    Parameters controlling the unload process. These are ignored for GameObject scenes.

    UnloadScene(Hash128, SceneSystem.UnloadParameters)

    Unload a SubScene by GUID. If this is called on a GameObject scene, it will only unload the first matching scene.

    Declaration
    public void UnloadScene(Hash128 sceneGUID, SceneSystem.UnloadParameters unloadParams = SceneSystem.UnloadParameters.Default)
    Parameters
    Type Name Description
    Hash128 sceneGUID

    The guid of the scene.

    SceneSystem.UnloadParameters unloadParams

    Parameters controlling the unload process. These are ignored for GameObject scenes.

    Extension Methods

    ComponentSystemBaseManagedComponentExtensions.HasSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.GetSingleton<T>(ComponentSystemBase)
    ComponentSystemBaseManagedComponentExtensions.SetSingleton<T>(ComponentSystemBase, T)
    JobForEachExtensions.GetEntityQueryForIJobForEach(ComponentSystemBase, Type)
    In This Article
    • Fields
      • k_SceneInfoFileName
      • sceneLoadRequestArchetype
      • sceneLoadRequestQuery
    • Properties
      • BuildConfigurationGUID
    • Methods
      • GetSceneEntity(Hash128)
      • GetSceneGUID(String)
      • IsSceneLoaded(Entity)
      • LoadSceneAsync(Hash128, SceneSystem.LoadParameters)
      • OnCreate()
      • OnUpdate()
      • UnloadScene(Entity, SceneSystem.UnloadParameters)
      • UnloadScene(Hash128, SceneSystem.UnloadParameters)
    • Extension Methods
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023