void Start() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } OSCHandler.Instance.Init(serverData, clientData); }
void Awake() { if (_instance != null && _instance != this) Destroy (this.gameObject); else { DontDestroyOnLoad (this.gameObject); _instance = this; try { OSCHandler.Instance.Init (serverData, clientData); OSCHandler.Instance.gameObject.transform.SetParent (this.transform); } catch (Exception e) { Debug.LogError (e.Message); } } }