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

ExclusiveEntityTransaction

struct in Unity.Entities

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

Description

Provides an interface to safely perform a subset of ExclusiveEntityTransaction.EntityManager operations from a single worker thread, by temporarily giving that thread exclusive access to a World's ExclusiveEntityTransaction.EntityManager.

The intended use case for this interface is to let a worker thread stream Entity data into a staging World and perform any necessary post-processing structural changes, prior to moving the final data into the main simulation world using EntityManager.MoveEntitiesFrom. This lets the main thread continue to safely process the primary world while the new data is loading in, and not require a main-thread sync point until the new Entities are fully loaded and ready to be injected.

Warning: Only the ExclusiveEntityTransaction.EntityManager operations exposed by this struct are supported within the context of an exclusive entity transaction. For more information, refer to Safety in Entities.

Additional resources: EntityManager.BeginExclusiveEntityTransaction, EntityManager.EndExclusiveEntityTransaction

Properties

Property Description
EntityManager Return the entity manager this transaction operates upon.

Public Methods

Method Description
SetComponentData Sets the value of a component of an entity.