Documentation

Unity Engine


Unity Engine


SetComponentEnabled(Entity, bool)

Obsolete. Use BufferLookup<T>.SetBufferEnabled instead.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
Warning
Deprecated. Use SetBufferEnabled (RemovedAfter: Entities pre-1.0)
public void SetComponentEnabled(Entity entity, bool value)

Parameters

entity

The entity whose component should be enabled or disabled.

value

True if the specified component should be enabled, or false if it should be disabled.

Remarks

Obsolete. Use BufferLookup<T>.SetBufferEnabled instead.
Enable or disable the IBufferElementData of type T on the specified Entity. This operation does not cause a structural change (even if it occurs on a worker thread), or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component. The type T must implement the IEnableableComponent interface.
Additional Resources: BufferLookup<T>.IsBufferEnabled