void CmdServerInit() { sv = GameObject.FindGameObjectWithTag("Server").GetComponent <ServerMngr>(); myConId = connectionToClient.connectionId; sv.register(myConId, this); }
private void Awake() { if (!instance) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }