docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Search Results for

    Show / Hide Table of Contents
    • Scripting API

    Struct SceneSystem

    High level API for loading and unloading scenes

    Implements
    ISystem
    ISystemStartStop
    Namespace: Unity.Scenes
    Assembly: solution.dll
    Syntax
    [WorldSystemFilter(WorldSystemFilterFlags.Default|WorldSystemFilterFlags.Editor|WorldSystemFilterFlags.Streaming, WorldSystemFilterFlags.Default)]
    [UpdateInGroup(typeof(SceneSystemGroup))]
    [BurstCompile]
    public struct SceneSystem : ISystem, ISystemStartStop

    Methods

    Name Description
    GetSceneEntity(WorldUnmanaged, Hash128)

    Find the scene given a guid. This will only return the first matching scene.

    GetSceneGUID(ref SystemState, string)

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

    GetSceneStreamingState(WorldUnmanaged, Entity)

    Check the streaming state of a scene that is being loaded.

    GetSectionStreamingState(WorldUnmanaged, Entity)

    Check the streaming state of a section that is being loaded.

    IsSceneLoaded(WorldUnmanaged, Entity)

    Check if a scene or subscene is loaded.

    IsSectionLoaded(WorldUnmanaged, Entity)

    Check if a section of a subscene is loaded.

    LoadPrefabAsync(WorldUnmanaged, EntityPrefabReference, LoadParameters)

    Load a prefab by its weak reference id. A PrefabRoot component is added to the returned entity when the load completes.

    LoadSceneAsync(WorldUnmanaged, Entity, LoadParameters)

    Loads a scene.

    LoadSceneAsync(WorldUnmanaged, Hash128, LoadParameters)

    Load a scene or prefab by its asset GUID. When loading a prefab a PrefabRoot component is added to the scene entity when the load completes.

    LoadSceneAsync(WorldUnmanaged, EntitySceneReference, LoadParameters)

    Load a scene by its weak reference id.

    OnCreate(ref SystemState)

    Callback invoked when the system is created.

    OnDestroy(ref SystemState)

    Callback invoked when the system is destroyed.

    OnStartRunning(ref SystemState)

    Callback invoked when the system starts running.

    OnStopRunning(ref SystemState)

    Callback invoked when the system stops running.

    OnUpdate(ref SystemState)

    Callback invoked when the system is updated.

    UnloadScene(WorldUnmanaged, Entity, UnloadParameters)

    Unload the scene.

    UnloadScene(WorldUnmanaged, Hash128, UnloadParameters)

    Unload a SubScene by GUID. This will only unload the first matching scene.

    UnloadScene(WorldUnmanaged, EntityPrefabReference, UnloadParameters)

    Unload a SubScene by its weak reference id. This will only unload the first matching scene.

    In This Article
    • Methods
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)