CompanionComponent<T>
An unmanaged component that references a UnityEngine.Component attached to an entity.
Read time 1 minuteLast updated a day ago
Definition
- Type: Struct
- Namespace: Unity.Entities
- Assembly: UnityEngine.CoreModule
- Implements: IComponentData, IQueryTypeParameter
public struct CompanionComponent<T> : IComponentData, IQueryTypeParameter where T : Component
Remarks
Register each type you use with RegisterGenericComponentTypeAttribute, for example .
[assembly: RegisterGenericComponentType(typeof(CompanionComponent<Light>))]Fields
Value | Description |
|---|---|
| CompanionRef | The reference to the UnityEngine.Component that this component exposes on the entity. |