SetComponentEnabled<T>(bool)
Enables or disables the enableable data component T, an IEnableableComponent, on the GameObject this Component is attached to.
Read time 1 minuteLast updated 6 hours ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public void SetComponentEnabled<T>(bool value) where T : unmanaged, IEnableableComponent
Parameters
True to enable the data component, false to disable it.
Remarks
Same as GameObject.SetComponentEnabled on Component.gameObject.
Throws an if the GameObject has been destroyed or doesn't have the data component.
ArgumentExceptionWaits for the jobs that read or write to complete. To avoid the wait, access in a job through a , or a for a Buffer. The job then runs after the jobs that read or write , instead of the main thread waiting for them.
TTUnity.Entities.ComponentLookupUnity.Entities.BufferLookupT