docs.unity3d.com
    Show / Hide Table of Contents

    Struct AutoCommandTarget

    Component that automates command "reading and sending" (for clients) or "writing, using, and broadcasting" (for the server).

    When the AutoCommandTarget component is Enabled, the entity is considered as an input source for ICommandData's for the client and all non empty command buffers present on the entity are serialized into the OutgoingCommandDataStreamBuffer, along with the id of the ghost they are sent to.

    ///

    On the server side, when a command is deserialized from the IncomingCommandDataStreamBuffer, the corresponding entity is looked up, and if the AutoCommandTarget component is enabled, the commands are added to the corresponding input command buffer.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct AutoCommandTarget : IComponentData, IQueryTypeParameter
    Remarks

    To use the AutoCommandTarget, the target entity must have a GhostOwner.

    Fields

    Enabled

    Enabled/Disable the current entity from sending and receiving commands. Multiple entities can be enabled at the same time.

    Declaration
    public bool Enabled
    Field Value
    Type Description
    Boolean
    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