private void Awake() { // make only one instance of AtmoTracker if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); _sessionIdList = new List <int>(); _markerDict = new Dictionary <int, GamePiece>(); Homography = new Homography(); _messageParser = new AtmoTuioMessageParser(); _oscControl = new OSCControl(_messageParser.Port); _atmoEventHandler = new AtmoEventHandler(_sessionIdList, _markerDict, TriggerAtmoEvent); } // destroy this gameObject if it's not the first instance else if (Instance != this) { Destroy(gameObject); } }
void Start() { oscControl = GameObject.Find("Directional Light").GetComponent <OSCControl> (); rend = this.gameObject.GetComponent <Renderer> (); }