文档

Unity Engine

Download Unity

Unity Engine

SetEnabledBitsOnAllChunks<T>(bool)

Obsolete. Use EntityManager.SetComponentEnabled instead.
阅读时间1 分钟最后更新于 20 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
警告
Deprecated. This method has been deprecated. Use EntityManager.SetComponentEnabled\<T\>(Unity.Entities.EntityQuery, bool) instead. (RemovedAfter Entities 1.0)
public void SetEnabledBitsOnAllChunks<T>(bool value) where T : struct, IEnableableComponent

Parameters

value

If true, the component
T
will be enabled on all entities in all matching chunks. Otherwise, the component will be disabled on all components in all chunks.

Remarks

Obsolete. Use EntityManager.SetComponentEnabled instead.
Sets or clears the "is enabled" bit for the provided component on all entities in all chunks matched by the query. The current value of the bits are ignored; this function will enable disabled components on entities, even if the component being disabled would cause the entity to not match the query. 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.