コード例 #1
0
        public void Destroy()
        {
#if DEBUG
            if (behaviourGmo)
            {
                GameObject.Destroy(behaviourGmo);
            }
            if (renderTextureBuffer != null)
            {
                renderTextureBuffer.Dispose();
            }
            renderTextureBuffer = null;
#endif
        }
コード例 #2
0
        private void InitializeLogic(int width, int height)
        {
#if DEBUG
            renderTextureBuffer = new ScreenShotLogic(width, height);
            var behaviourGmo = new GameObject();
            behaviourGmo.hideFlags = HideFlags.HideAndDontSave;
            GameObject.DontDestroyOnLoad(behaviourGmo);
            var behaviour = behaviourGmo.AddComponent <ScreenShotBehaviour>();

            this.captureSampler    = CustomSampler.Create("ScreenshotToProfiler.Capture");
            this.updateSampler     = CustomSampler.Create("ScreenshotToProfiler.Update");
            behaviour.captureFunc += this.Capture;
            behaviour.updateFunc  += this.Update;
#endif
        }