Struct Scene | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Scene

    A scene represents a grouped collection of entities within the world.

    Namespace: Unity.Tiny.Scenes
    Syntax
    public struct Scene : IEquatable<Scene>

    Constructors

    Scene(Guid, UInt32)

    Declaration
    public Scene(Guid sceneGuid, uint sceneInstanceId)
    Parameters
    Type Name Description
    System.Guid sceneGuid
    System.UInt32 sceneInstanceId

    Scene(SceneGuid, SceneInstanceId)

    Declaration
    public Scene(SceneGuid sceneGuid, SceneInstanceId sceneInstanceId)
    Parameters
    Type Name Description
    SceneGuid sceneGuid
    SceneInstanceId sceneInstanceId

    Fields

    Null

    Declaration
    public static readonly Scene Null
    Field Value
    Type Description
    Scene

    SceneGuid

    Declaration
    public readonly SceneGuid SceneGuid
    Field Value
    Type Description
    SceneGuid

    SceneInstanceId

    Declaration
    public readonly SceneInstanceId SceneInstanceId
    Field Value
    Type Description
    SceneInstanceId

    Methods

    AddEntityReference(EntityManager, Entity)

    Sets the given entity to be part of the scene.

    Declaration
    public void AddEntityReference(EntityManager entityManager, Entity entity)
    Parameters
    Type Name Description
    EntityManager entityManager

    The entity manager to operate on.

    Entity entity

    The entity to add.

    EntityCount(EntityManager)

    Returns the number of entities in the scene.

    Declaration
    public int EntityCount(EntityManager entityManager)
    Parameters
    Type Name Description
    EntityManager entityManager
    Returns
    Type Description
    System.Int32

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    Equals(Scene)

    Declaration
    public bool Equals(Scene other)
    Parameters
    Type Name Description
    Scene other
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    ToEntityArray(EntityManager, Allocator)

    Returns the set of all entities for the scene.

    Declaration
    public NativeArray<Entity> ToEntityArray(EntityManager entityManager, Allocator allocator)
    Parameters
    Type Name Description
    EntityManager entityManager
    Allocator allocator
    Returns
    Type Description
    Unity.Collections.NativeArray<Entity>

    Operators

    Equality(Scene, Scene)

    Declaration
    public static bool operator ==(Scene left, Scene right)
    Parameters
    Type Name Description
    Scene left
    Scene right
    Returns
    Type Description
    System.Boolean

    Inequality(Scene, Scene)

    Declaration
    public static bool operator !=(Scene left, Scene right)
    Parameters
    Type Name Description
    Scene left
    Scene right
    Returns
    Type Description
    System.Boolean
    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