docs.unity3d.com
    Show / Hide Table of Contents

    Struct GhostOwner

    The GhostOwnerComponent is an optional component that can be added to a ghost to create a bond/relationship in between an entity and a specific client (for example, the client who spawned that entity, a bullet, the player entity). It is usually added to predicted ghost (see PredictedGhost) but can also be present on the interpolated ones.

    It is mandatory to add a GhostOwner in the following cases:

    - When a ghost is configured to be owner-predicted GhostMode, because it is necessary to distinguish in between who is predicting (the owner) and who is interpolating the ghost.

    - If you want to enable remote player prediction (see ICommandData) or, in general, to allow sending data based on ownership the SendToOwner.

    - If you want to use the AutoCommandTarget feature.

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

    Fields

    NetworkId

    The NetworkId of the client the entity is associated with.

    Declaration
    public int NetworkId
    Field Value
    Type Description
    Int32
    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