Init
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameBootstrapper : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] private GameObject playerPrefab;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
NetworkManager.Singleton.StartServer();
|
||||
GameObject go = Instantiate(playerPrefab);
|
||||
go.GetComponent<NetworkObject>().SpawnAsPlayerObject(NetworkManager.Singleton.LocalClientId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user