Example #1
0
 void Start()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
     OSCHandler.Instance.Init(serverData, clientData);
 }
Example #2
0
		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);
				}
			}
		}