Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
397 B
0
Indexable
Never
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);
    }
}
Leave a Comment