private void OnEnable()
        {
#if UNITY_EDITOR
            if (!UnityEditor.EditorApplication.isPlaying)
            {
                return;
            }
#endif

            if (dbgData == null)
            {
                dbgData = new DebugData(this);
            }

            Init();

            StartCoroutine(AdaptiveTask());
#if UNITY_2019_1_OR_NEWER && UNITY_POST_PROCESSING_STACK_V2 && (SSAA_HDRP || SSAA_LWRP)
            // only on SRP
            if (!MadGoatSSAA_Utils.DetectSRP())
            {
                return;
            }
            //UnityEngine.Experimental.Rendering.RenderPipeline.BeginCameraRendering(GetComponent<Camera>());
            UnityEngine.Experimental.Rendering.RenderPipeline.beginCameraRendering += OnBeginCameraRender;
#elif UNITY_2018_1_OR_NEWER && UNITY_POST_PROCESSING_STACK_V2 && (SSAA_HDRP || SSAA_LWRP)
            // only on SRP
            if (!MadGoatSSAA_Utils.DetectSRP())
            {
                return;
            }
            RenderPipeline.BeginCameraRendering(GetComponent <Camera>());
            RenderPipeline.beginCameraRendering += OnBeginCameraRender;
#endif
        }
Beispiel #2
0
        private void OnEnable()
        {
            if (dbgData == null)
            {
                dbgData = new DebugData(this);
            }

            Init();
            StartCoroutine(AdaptiveTask());
        }
Beispiel #3
0
        // Unity stuff
        private void OnEnable()
        {
            if (dbgData == null)
            {
                dbgData = new DebugData(this);
            }

            currentCamera = GetComponent <Camera>();
            Init();
            StartCoroutine(AdaptiveTask());
        }