Exemplo n.º 1
0
        /// <inheritdoc/>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_InputStrategy.ReleaseCamera();
                UnityHelpers.Destroy(m_UICamera);

                if (m_ModifiedResolution)
                {
                    if (GameViewSize.modifiedResolutionCount > 0)
                    {
                        GameViewSize.modifiedResolutionCount--; // don't allow negative if called twice
                    }
                    if (GameViewSize.modifiedResolutionCount == 0)
                    {
                        GameViewSize.RestoreSize();
                    }
                }

                if (m_VFlipper != null)
                {
                    m_VFlipper.Dispose();
                }
            }

            base.Dispose(disposing);
        }
Exemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_ModifiedResolution)
                {
                    GameViewSize.modifiedResolutionCount--;
                    if (GameViewSize.modifiedResolutionCount == 0)
                    {
                        GameViewSize.RestoreSize();
                    }
                }
            }

            m_VFlipper?.Dispose();
            m_VFlipper = null;

            base.Dispose(disposing);
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_Cubemap1)
                {
                    UnityHelpers.Destroy(m_Cubemap1);
                }
                if (m_Cubemap2)
                {
                    UnityHelpers.Destroy(m_Cubemap2);
                }

                if (m_VFlipper != null)
                {
                    m_VFlipper.Dispose();
                }
            }

            base.Dispose(disposing);
        }
Exemplo n.º 4
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_ModifiedResolution)
                {
                    if (GameViewSize.modifiedResolutionCount > 0)
                    {
                        GameViewSize.modifiedResolutionCount--; // don't allow negative if called twice
                    }
                    if (GameViewSize.modifiedResolutionCount == 0)
                    {
                        GameViewSize.RestoreSize();
                    }
                }
            }

            m_VFlipper?.Dispose();
            m_VFlipper = null;

            base.Dispose(disposing);
        }
Exemplo n.º 5
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                ReleaseCamera();
                UnityHelpers.Destroy(m_UICamera);
#if UNITY_EDITOR
                if (m_ModifiedResolution)
                {
                    GameViewSize.m_ModifiedResolutionCount--;
                    if (GameViewSize.m_ModifiedResolutionCount == 0)
                    {
                        GameViewSize.RestoreSize();
                    }
                }
#endif
                if (m_VFlipper != null)
                {
                    m_VFlipper.Dispose();
                }
            }

            base.Dispose(disposing);
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (m_hookedCameras != null)
                {
                    foreach (var c in m_hookedCameras)
                    {
                        if (c != null)
                        {
                            if (c.camera.rect.width == 1f && c.camera.rect.height == 1f)
                            {
                                UnityHelpers.Destroy(c.camera.targetTexture);
                            }
                            c.camera.targetTexture = c.textureBackup;
                        }
                    }
                    m_hookedCameras.Clear();
                }

                UnityHelpers.Destroy(m_renderRT);
                foreach (var rt in m_accumulateRTs)
                {
                    UnityHelpers.Destroy(rt);
                }
                UnityHelpers.Destroy(m_superMaterial);
                UnityHelpers.Destroy(m_accumulateMaterial);
                UnityHelpers.Destroy(m_normalizeMaterial);
                if (m_VFlipper != null)
                {
                    m_VFlipper.Dispose();
                }
            }

            base.Dispose(disposing);
        }