docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method BeginExclusiveEntityTransaction

    BeginExclusiveEntityTransaction()

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

    Declaration
    public ExclusiveEntityTransaction BeginExclusiveEntityTransaction()
    Returns
    Type Description
    ExclusiveEntityTransaction

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

    Remarks

    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 World that acts as a staging area to construct and setup entities.

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

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)