| Parameter | Description |
|---|---|
| systemHandle | The system whose component should be enabled or disabled. |
| value | True if the specified component should be enabled, or false if it should be disabled. |
Enable or disable a ComponentType on the specified SystemHandle.
This operation does not cause a structural change, and does not affect the current value of the component.
To enable/disable components from a job, use ComponentLookup<T0>.SetComponentEnabled.
Additional resources: EntityManager.IsComponentEnabled, ComponentLookup<T0>.SetComponentEnabled
| Parameter | Description |
|---|---|
| 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. |
Enable or disable a ComponentType on the specified Entity.
This operation does not cause a structural change, and does not affect the current value of the component.
An entity with a disabled component will not match an EntityQuery that requires that component,
and will match a query that excludes that component.
To enable/disable components from a job, use ComponentLookup<T0>.SetComponentEnabled.
To enable/disable an entire Entity, use EntityManager.SetEnabled (which, unlike this function,
does involve a structural change).
Additional resources: EntityManager.IsComponentEnabled, ComponentLookup<T0>.SetComponentEnabled
| Parameter | Description |
|---|---|
| query | The query whose matching chunks should be affected. |
| value | If true, the component T will be enabled on all entities in all
matching chunks. Otherwise, the component will be disabled on all entities in all matching chunks. |
Sets or clears the "is enabled" bit for the provided component on all entities in all chunks matched by the query, ignoring the current state of any enableable components in the query.
This method ignores the current state of all enableable components in the query. The target component
will be enabled or disabled on every entity in every chunk that matches the query. Specifically, this function
will enable disabled components on entities, even if the disabled component would cause its entity to not match
the query.
To enable or disable a component on all entities that match a query (while respecting the current status of
enableable components), the recommended workaround is to use a simple IJobEntity or foreach loop.
If any jobs are currently running which read or write the target component, this function will block until
they complete before performing the requested operation.
Additional resources: EntityManager.IsComponentEnabled, ComponentLookup<T0>.SetComponentEnabled
| Parameter | Description |
|---|---|
| componentType | The component type which should be enabled or disabled on all matching chunks. This type must be included in the query's required types, and must implement IEnableableComponent. |
| query | The query whose matching chunks should be affected. |
| value | If true, the component T will be enabled on all entities in all
matching chunks. Otherwise, the component will be disabled on all entities in all matching chunks. |
Sets or clears the "is enabled" bit for the provided component on all entities in all chunks matched by the query, ignoring the current state of any enableable components in the query.
This method ignores the current state of all enableable components in the query. The target component
will be enabled or disabled on every entity in every chunk that matches the query. Specifically, this function
will enable disabled components on entities, even if the disabled component would cause its entity to not match
the query.
To enable or disable a component on all entities that match a query (while respecting the current status of
enableable components), the recommended workaround is to use a simple IJobEntity or foreach loop.
If any jobs are currently running which read or write the target component, this function will block until
they complete before performing the requested operation.
Additional resources: EntityManager.IsComponentEnabled, ComponentLookup<T0>.SetComponentEnabled
| Parameter | Description |
|---|---|
| entity | The entity whose component should be enabled or disabled. |
| componentType | The component type to enable or disable. This type must implement the IEnableableComponent interface. |
| value | True if the specified component should be enabled, or false if it should be disabled. |
Enable or disable ComponentType on the specified Entity.
This operation does not cause a structural change, and does not affect the current value of the component.
An entity with a disabled component will not match an EntityQuery that requires that component,
and will match a query that excludes that component.
To enable/disable components from a job, use ComponentLookup<T0>.SetComponentEnabled.
To enable/disable an entire Entity, use EntityManager.SetEnabled (which, unlike this function,
does involve a structural change).
Additional resources: EntityManager.IsComponentEnabled, ComponentLookup<T0>.SetComponentEnabled