文档

Unity Engine

Download Unity

Unity Engine

CompanionComponent<T>

An unmanaged component that references a UnityEngine.Component attached to an entity.
阅读时间1 分钟最后更新于 19 天前

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.