Documentation

Unity Engine


Unity Engine


GetSharedComponentIndex<T>(Entity)

Retrieves the index of the unmanaged shared component for an entity.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public int GetSharedComponentIndex<T>(Entity entity) where T : unmanaged, ISharedComponentData

Parameters

entity

The target entity

Returns

Type

Description

intThe index of the target entity's value for the shared component of type
T
.