Class GhostComponentUtilities | Unity NetCode | 0.6.0-preview.7
docs.unity.cn
    Show / Hide Table of Contents

    Class GhostComponentUtilities

    Utility methods for working with GhostComponent.

    Inheritance
    Object
    GhostComponentUtilities
    Namespace: Unity.NetCode
    Syntax
    public static class GhostComponentUtilities

    Methods

    GetFirstGhostTypeId(NativeArray<GhostComponent>)

    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<GhostComponent> self)
    Parameters
    Type Name Description
    NativeArray<GhostComponent> self
    Returns
    Type Description
    Int32

    GetFirstGhostTypeId(NativeArray<GhostComponent>, 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<GhostComponent> self, out int firstGhost)
    Parameters
    Type Name Description
    NativeArray<GhostComponent> self
    Int32 firstGhost
    Returns
    Type Description
    Int32
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Saturday, January 23, 2021