void OnEnable() { if (GlobalSensorController.WasSetFromLoader) { sensorType = GlobalSensorController.StartWithSensor; } adapter = new SensorAdapter(sensorType) { OnChangedAvailabilityEventHandler = (sender, args) => { Debug.Log(args.SensorType + " is connected: " + args.IsConnected); } }; greenScreenFilter = new GreenScreenFilter(adapter); }