docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkSpawnManager

    Class that handles object spawning

    Inheritance
    object
    NetworkSpawnManager
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public class NetworkSpawnManager

    Fields

    Name Description
    OwnershipToObjectsTable

    Use to get all NetworkObjects owned by a client Ownership to Objects Table Format: [ClientId][NetworkObjectId][NetworkObject] Server: Keeps track of all clients' ownership Client: Keeps track of only its ownership

    SpawnedObjects

    The currently spawned objects

    SpawnedObjectsList

    A list of the spawned objects

    Properties

    Name Description
    NetworkManager

    Gets the NetworkManager associated with this SpawnManager.

    Methods

    Name Description
    GetClientOwnedObjects(ulong)

    Returns a list of all NetworkObjects that belong to a client.

    GetLocalPlayerObject()

    Returns the local player object or null if one does not exist

    GetPlayerNetworkObject(ulong)

    Returns the player object with a given clientId or null if one does not exist. This is only valid server side.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)