void Awake() { instance = this; Assert.IsNotNull(this.controlledCamera); UniRxEvent.GlobalBroker.Receive <ChangeBackgroundColor>() .SubscribeWithState(this, (x, _this) => _this.Change(x.ColorType)) .AddTo(this); }
void OnDestroy() { instance = null; }