docs.unity3d.com
    Show / Hide Table of Contents

    Method CreateCommandBuffer

    CreateCommandBuffer()

    Creates an EntityCommandBuffer and adds it to this system's list of command buffers.

    Declaration
    public EntityCommandBuffer CreateCommandBuffer()
    Returns
    Type Description
    EntityCommandBuffer

    A command buffer that will be executed by this system.

    Remarks

    This buffer system executes its list of command buffers during its OnUpdate() function in the order you created the command buffers.

    If you write to a command buffer in a Job, you must add the Job as a dependency of this system by calling AddJobHandleForProducer(JobHandle). The dependency ensures that the buffer system waits for the Job to complete before executing the command buffer.

    If you write to a command buffer from a parallel Job, such as IJobForEach<T0> or IJobChunk, you must use the concurrent version of the command buffer, provided by EntityCommandBuffer.ParallelWriter.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023