Ejemplo n.º 1
0
        public void OnCaptureEndDelegate()
        {
            // Stop listening the callback
            ScreenshotManager.onCaptureEndDelegate -= OnCaptureEndDelegate;

            // Update the texture image
            m_Texture.texture = m_ScreenshotManager.GetFirstActiveResolution().m_Texture;

            // Scale the texture to fit its parent size
            m_Texture.SetNativeSize();
            float scaleCoeff = m_ImageContainer.rect.height / m_Texture.texture.height;

            m_Texture.transform.localScale = new Vector3(scaleCoeff, scaleCoeff, scaleCoeff);

            // Show canvas
            m_Canvas.enabled = true;
        }