Exemplo n.º 1
0
        /// <summary>
        /// 初期処理
        /// </summary>
        protected virtual void Awake()
        {
#if DEBUG
            _debugManager = _diContainer.InstantiatePrefabForComponent <Utility.DebugConfig.DebugConfigManager>(_debugManager, _debugManagerRoot);
            _diContainer
            .Bind <Utility.DebugConfig.DebugConfigManager>()
            .FromInstance(_debugManager)
            .AsSingle();

            Observable.EveryUpdate()
            .Where(_ => Keyboard.current.leftShiftKey.isPressed && Keyboard.current.pKey.isPressed)
            .ThrottleFirst(TimeSpan.FromSeconds(0.5))
            .Subscribe(_ =>
            {
                if (_debugManager.IsOpened)
                {
                    _debugManager.Close();
                }
                else
                {
                    _debugManager.Open();
                }
            });
#endif
        }