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

EntityManager.SetComponentData

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 void SetComponentData(Entity entity, T componentData);

Parameters

Parameter Description
entity The entity whose T component should be modified.
componentData The value to assign to entity's T component.

Description

Sets the value of a component of an entity.

The target entity must exist, and it must have the target component.


Declaration

public void SetComponentData(SystemHandle system, T componentData);

Parameters

Parameter Description
system Handle to the system whose entity's T component should be modified.
componentData The value to assign to the T component.

Description

Sets the value of a component of an entity associated with a system.

The target entity must exist, and it must have the target component.