コード例 #1
0
        private void PlaymodeStateChangedHandler()
        {
            if (ShadowManager.IsDestroyed)
            {
                return;
            }

            ShadowManager shadowManager = ShadowManager.Instance;

            if (EditorApplication.isPlaying && !EditorApplication.isPaused)
            {
                shadowManager.Clear(false, true);
                shadowManager.UpdateStaticShadows();
                _updateFrameCount = 1;

                _isClearedOnPlaymodeChange      = false;
                _isPausedOnPlaymodeChangeToPlay = _isPausedOnPlaymodeChangeLast;
            }

            _isPausedOnPlaymodeChangeLast = EditorApplication.isPaused;
        }