void Awake() { Application.targetFrameRate = 60; gameNetwork = FindObjectOfType <GameNetwork>(); if (gameNetwork == null) //in editor { gameNetwork = Instantiate(networkMgrPrefab); } networkDiscovery = gameNetwork.GetComponent <NetworkDiscovery>(); }