docs.unity3d.com
    Show / Hide Table of Contents

    Class GhostComponentUtilities

    Utility methods for working with GhostComponents.

    Inheritance
    Object
    GhostComponentUtilities
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.NetCode
    Syntax
    public static class GhostComponentUtilities

    Methods

    GetDebugTypeName(ComponentType)

    Retrieve the component name as NativeText. The method is burst compatible.

    Declaration
    public static NativeText.ReadOnly GetDebugTypeName(this ComponentType self)
    Parameters
    Type Name Description
    ComponentType self
    Returns
    Type Description
    NativeText.ReadOnly

    The component name.

    GetFirstGhostTypeId(NativeArray<GhostInstance>)

    Find the first valid ghost type id in an array of ghost components. Pre-spawned ghosts have type id -1.

    Declaration
    public static int GetFirstGhostTypeId(this NativeArray<GhostInstance> self)
    Parameters
    Type Name Description
    NativeArray<GhostInstance> self
    Returns
    Type Description
    Int32

    The ghost type index if a ghost with a valid type is found, -1 otherwise

    GetFirstGhostTypeId(NativeArray<GhostInstance>, out Int32)

    Find the first valid ghost type id in an array of ghost components. Pre-spawned ghosts have type id -1. This method returns -1 if no ghost type id is found.

    Declaration
    public static int GetFirstGhostTypeId(this NativeArray<GhostInstance> self, out int firstGhost)
    Parameters
    Type Name Description
    NativeArray<GhostInstance> self
    Int32 firstGhost

    The first valid ghost type index found will be stored in this variable.

    Returns
    Type Description
    Int32

    A valid ghost type id, or -1 if no ghost type id was found.

    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