public void CaptureFrame()
        {
            Component[] components = Object.FindObjectsOfType <Component>();
            for (int i = 0; i < components.Length; i++)
            {
                Component component = components[i];

                if (component is Image image)
                {
                    result.ReportImage(image);
                }
                else if (component is Button button)
                {
                    result.ReportButton(button);
                }
                else if (component is SpriteRenderer spriteRenderer)
                {
                    result.ReportSpriteRenderer(spriteRenderer);
                }
                else if (component is SpriteMask spriteMask)
                {
                    result.ReportSpriteMask(spriteMask);
                }
            }
        }
Exemple #2
0
        void IProjectUpdateLoopListener.OnProjectUpdate()
        {
            Component[] components = Object.FindObjectsOfType <Component>();
            for (int i = 0; i < components.Length; i++)
            {
                Component component = components[i];

                if (component is Image image)
                {
                    result.ReportImage(image);
                }
                else if (component is Button button)
                {
                    result.ReportButton(button);
                }
                else if (component is SpriteRenderer spriteRenderer)
                {
                    result.ReportSpriteRenderer(spriteRenderer);
                }
                else if (component is SpriteMask spriteMask)
                {
                    result.ReportSpriteMask(spriteMask);
                }
            }
        }