示例#1
0
        private void CheckAllImg()
        {
            var imgs = gameObject.GetComponentsInChildren <Image>().ToList();

            foreach (Image img in imgs)
            {
                if (img.sprite != null)
                {
                    SepRes sepRes = new SepRes()
                    {
                        wrapper = img,
                        resType = ResType.IMG,
                        resName = img.sprite.name
                    };
                    sepRess.Add(sepRes);
                    img.sprite = null;
                }
            }
        }
示例#2
0
        private void CheckAllText()
        {
            var texts = gameObject.GetComponentsInChildren <Text>().ToList();

            foreach (Text text in texts)
            {
                if (text.font != null && text.font.name != "Arial")
                {
                    SepRes sepRes = new SepRes()
                    {
                        wrapper = text,
                        resType = ResType.FONT,
                        resName = text.font.name
                    };
                    sepRess.Add(sepRes);
                    text.font = null;
                }
            }
        }
示例#3
0
        private void CheckAllImg()
        {
            List <Image> imgs = new List <Image>();

            Utils.GetComponent <Image>(gameObject, ref imgs);
            foreach (Image img in imgs)
            {
                if (img.sprite != null)
                {
                    SepRes sepRes = new SepRes()
                    {
                        wrapper = img,
                        resType = ResType.IMG,
                        resName = img.sprite.name
                    };
                    sepRess.Add(sepRes);
                    img.sprite = null;
                }
            }
        }
示例#4
0
        private void CheckAllText()
        {
            List <Text> texts = new List <Text>();

            Utils.GetComponent <Text>(gameObject, ref texts);
            foreach (Text text in texts)
            {
                if (text.font != null && text.font.name != "Arial")
                {
                    SepRes sepRes = new SepRes()
                    {
                        wrapper = text,
                        resType = ResType.FONT,
                        resName = text.font.name
                    };
                    sepRess.Add(sepRes);
                    text.font = null;
                }
            }
        }