IEnableableComponent
An interface for a component type which allows the component to be enabled and disabled at runtime without a structural change.
阅读时间1 分钟最后更新于 19 天前
Definition
- Type: Interface
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public interface IEnableableComponent
Remarks
This interface is only valid when used in combination with IBufferElementData or IComponentData. While the extra overhead involved in processing enableable components is generally quite low, this interface should only be used on components that will actually be enabled/disabled by the application at relatively high frequency.
Additional Resources: EntityManager.SetComponentEnabled, EntityManager.IsComponentEnabled, ComponentLookup<T>.SetComponentEnabled, ComponentLookup<T>.IsComponentEnabled, BufferLookup<T>.SetBufferEnabled, BufferLookup<T>.IsBufferEnabled, ArchetypeChunk.SetComponentEnabled, ArchetypeChunk.IsComponentEnabled