Struct CompanionComponent<T>
An unmanaged component that references a UnityEngine.Component attached to an entity.
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
public struct CompanionComponent<T> : IComponentData, IQueryTypeParameter where T : Component
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
Register each type you use with RegisterGenericComponentTypeAttribute, for
example [assembly: RegisterGenericComponentType(typeof(CompanionComponent<Light>))].
Fields
| Name | Description |
|---|---|
| CompanionRef | The reference to the UnityEngine.Component that this component exposes on the entity. |