// Use this for initialization void Start() { // Get references for further use deviceManager = DeviceManager.getInstance(); playishManager = PlayishManager.getInstance(); // Sync existing devices syncExistingDevices(); // Set events deviceManager.deviceAddedEvent += onDeviceAdded; deviceManager.deviceRemovedEvent += onDeviceRemoved; deviceManager.deviceChangedEvent += onDevicesChanged; playishManager.playishPauseEvent += onBrowserPaused; playishManager.playishResumeEvent += onBrowserResumed; // Settings Application.runInBackground = true; DontDestroyOnLoad(transform.gameObject); }
public string nameOfController; // Type your name of your controller in the unity inspector void Start() { playish = PlayishManager.getInstance(); // Gets the playishmanager instance in your scene playish.changeController(nameOfController); // This function tells the playishManager what name your custom controller has and then fetches it for the app }