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; } } }
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; } } }
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; } } }
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; } } }