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

EntityManager.BeginExclusiveEntityTransaction

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 ExclusiveEntityTransaction BeginExclusiveEntityTransaction();

Returns

ExclusiveEntityTransaction A transaction object that provides an functions for making structural changes.

Description

Begins an exclusive entity transaction, which allows you to make structural changes inside a Job.

ExclusiveEntityTransaction allows you to create and destroy entities from a job. The purpose is to enable procedural generation scenarios where instantiation on big scale must happen on jobs. As the name implies it is exclusive to any other access to the EntityManager.

An exclusive entity transaction should be used on a manually created EntityManager.World that acts as a staging area to construct and setup entities.

After the job has completed you can end the transaction and use EntityManager.MoveEntitiesFrom to move the entities to an active EntityManager.World.