Beispiel #1
0
    private void Awake()
    {
        if (singleton == null)
        {
            singleton = this;
        }
        else
        {
            Destroy(this.gameObject);
        }



        Utilities.DontDestroyOnLoad(this.gameObject);


        // Initialize server files
        ServerData.Init();



#if UNITY_SERVER
        StartDedicatedServer();
#else
        StartClient();
#endif
    }