docs.unity.cn
    Show / Hide Table of Contents

    Method SetEnabledBitsOnAllChunks

    SetEnabledBitsOnAllChunks<T>(Boolean)

    Obsolete. Use SetComponentEnabled<T>(EntityQuery, Boolean) instead.

    Declaration
    [Obsolete("This method has been deprecated. Use EntityManager.SetComponentEnabled<T>(Unity.Entities.EntityQuery, bool) instead. (RemovedAfter Entities 1.0)")]
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleEnableableComponent)})]
    public void SetEnabledBitsOnAllChunks<T>(bool value)
        where T : IEnableableComponent
    Parameters
    Type Name Description
    Boolean 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.

    Type Parameters
    Name Description
    T

    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.

    Remarks

    Obsolete. Use SetComponentEnabled<T>(EntityQuery, Boolean) 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.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023