Untitled

Anonymous
plain_text
02/23/2024 4:30 PM
532 B
14
Indexable
using UnityEngine;
using UnityEngine.Networking;

public class MultiplayerGameManager : NetworkManager
{
    public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
    {
        GameObject player = Instantiate(playerPrefab, GetStartPosition().position, Quaternion.identity);
        NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
    }
}
Editor is loading...
Leave a Comment