Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

SystemAPI.SetBufferEnabled

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void SetBufferEnabled(Entity entity, bool value);

Parameters

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.

Description

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.

Not working in Entities.ForEach, IJobEntity, and Utility methods

Additional resources: SystemAPI.IsBufferEnabled