Struct SceneMembership
Tracks which scene an entity belongs to and its reference count.
public struct SceneMembership : IComponent
- Implements
- Inherited Members
Remarks
Entities can belong to multiple scenes through reference counting. When an entity transitions between scenes, its reference count is adjusted.
When a scene unloads, entities with ReferenceCount reaching zero are despawned (unless they have PersistentTag).
Fields
OriginScene
The scene root entity this entity originated from.
public Entity OriginScene
Field Value
ReferenceCount
Number of scenes currently referencing this entity.
public int ReferenceCount