Struct Scene
A scene represents a grouped collection of entities within the world.
Syntax
public struct Scene : IEquatable<Scene>
Constructors
Scene(Hash128, UInt32)
Declaration
public Scene(Hash128 sceneGuid, uint sceneInstanceId)
Parameters
| Type |
Name |
Description |
| Hash128 |
sceneGuid |
|
| UInt32 |
sceneInstanceId |
|
Scene(SceneGuid, SceneInstanceId)
Declaration
public Scene(SceneGuid sceneGuid, SceneInstanceId sceneInstanceId)
Parameters
Fields
Null
Declaration
public static readonly Scene Null
Field Value
SceneGuid
Declaration
public readonly SceneGuid SceneGuid
Field Value
SceneInstanceId
Declaration
public readonly SceneInstanceId SceneInstanceId
Field Value
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
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| Object |
obj |
|
Returns
Overrides
Equals(Scene)
Declaration
public bool Equals(Scene other)
Parameters
| Type |
Name |
Description |
| Scene |
other |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
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
Operators
Equality(Scene, Scene)
Declaration
public static bool operator ==(Scene left, Scene right)
Parameters
Returns
Inequality(Scene, Scene)
Declaration
public static bool operator !=(Scene left, Scene right)
Parameters
Returns