void Awake() { if(_instance == null) { _instance = this; } DontDestroyOnLoad(_instance.gameObject); }
void Awake() { if (_instance == null) { _instance = this; } DontDestroyOnLoad(_instance.gameObject); }
void Awake() { _instance = this; // assign tracker trackers = new Dictionary<string, AbstractTracker>(); trackers.Add(Config.OSC_ADDRESS_BALL, new BallTracker(Config.BALL_MAX_COUNT)); trackers.Add(Config.OSC_ADDRESS_POCKET, new PocketTracker()); trackers.Add(Config.OSC_ADDRESS_COLLISION, new CollisionTracker()); trackers.Add(Config.OSC_ADDRESS_CUE, new CueTracker()); trackers.Add(Config.OSC_ADDRESS_CALIBRATION, new CaliblationTracker()); oscManager = OSCManager.instance; oscManager.LocalPort = Config.OSC_PORT; }