GetSharedComponentIndex
Gets the index of a shared component value of an entity, and the world the index belongs to.
阅读时间1 分钟最后更新于 1 天前
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetSharedComponentIndex<T>(Entity, WorldUnmanaged)
Gets the index of a shared component value of an entity, and the world the index belongs to.
public static int GetSharedComponentIndex<T>(Entity entity, out WorldUnmanaged world) where T : unmanaged, ISharedComponentData
Parameters
Returns
Type | Description |
|---|---|
| int | The shared component index in |
Remarks
Shared component indices are per world, so the index is only meaningful in .
worldGetSharedComponentIndex<T>(WorldUnmanaged, Entity)
Gets the index of a shared component value of an entity in the given world.
public static int GetSharedComponentIndex<T>(WorldUnmanaged world, Entity entity) where T : unmanaged, ISharedComponentData
Parameters
The world that owns the entity. An entity from another world is treated as missing.
The entity.
Returns
Type | Description |
|---|---|
| int | The shared component index in |