UniversalAdditionalCameraData GetCameraData()
        {
            PixelPerfectCamera            obj        = target as PixelPerfectCamera;
            UniversalAdditionalCameraData cameraData = null;

            obj?.TryGetComponent(out cameraData);
            return(cameraData);
        }
Example #2
0
        bool UsingRenderer2D()
        {
            PixelPerfectCamera            obj        = target as PixelPerfectCamera;
            UniversalAdditionalCameraData cameraData = null;

            obj?.TryGetComponent(out cameraData);

            if (cameraData != null)
            {
                Renderer2D renderer2D = cameraData.scriptableRenderer as Renderer2D;
                if (renderer2D != null)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
        void CheckForCameraStacking()
        {
            m_CameraStacking = false;

            PixelPerfectCamera            obj        = target as PixelPerfectCamera;
            UniversalAdditionalCameraData cameraData = null;

            obj?.TryGetComponent(out cameraData);

            if (cameraData == null)
            {
                return;
            }

            if (cameraData.renderType == CameraRenderType.Base)
            {
                var cameraStack = cameraData.cameraStack;
                m_CameraStacking = cameraStack != null ? cameraStack.Count > 0 : false;
            }
            else if (cameraData.renderType == CameraRenderType.Overlay)
            {
                m_CameraStacking = true;
            }
        }