public void Awake() { if (Instance == null) { Instance = this; } Init(); }
public void OnDestroy() { Instance = null; if (this.socketManager != null) { // Leaving this sample, close the socket this.socketManager.Close(); this.socketManager = null; } }