Documentation

Unity Engine


Unity Engine


CompanionComponent<T>

An unmanaged component that references a UnityEngine.Component attached to an entity.
Read time 1 minuteLast updated a day ago

Definition

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

CompanionRefThe reference to the UnityEngine.Component that this component exposes on the entity.