GetSceneSectionEntity(int, EntityManager, ref EntityQuery, bool)
Gets the entity representing the scene section with the index passed in. If createIfMissing is true the section entity is created if it doesn't already exist. Metadata components added to this section entity will be serialized into the entity scene header. At runtime these components will be added to the scene section entities when the scene is resolved. Only struct IComponentData components without BlobAssetReferences or Entity members are supported.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities.Serialization
- Assembly: UnityEngine.EntitiesModule
GetSceneSectionEntity(int, EntityManager, EntityQuery, bool)
public static Entity GetSceneSectionEntity(int sectionIndex, EntityManager manager, ref EntityQuery cachedSceneSectionEntityQuery, bool createIfMissing = true)
Parameters
The section index for which to get the scene section entity
The entity manager to which the entity belongs
The EntityQuery used to find the entity. Initially an null query should be passed in, the same query can the be passed in for subsequent calls to avoid recreating the query
If true the section entity is created if it doesn't already exist. If false Entity.Null is returned for missing section entities
Returns
Type | Description |
|---|---|
| Entity | The entity representing the scene section |