Exemple #1
0
        public void ChangeAspectRatio(int width, int height, bool isCameraLocked = false)
        {
            if (SceneRenderer != null)
            {
                SceneRenderer.UpdateFrameBufferSize(width, height);
            }

            if (m_Objects.CamerasCount > 0)
            {
                if (!isCameraLocked && m_CurrentViewedCamera.Name != Settings.NameMainCamera)
                {
                    m_CurrentViewedCamera = GetMainCamera();
                }
                m_CurrentViewedCamera.ChangeAspectRatio(SceneRenderer.AspectRatio);
            }
        }