Пример #1
0
 public static void RecordRecursive(GameObject g)
 {
     ImageSpriteReassign.RecordAndRemoveReference(g, true);
     TextFontReassign.RecordAndRemoveReference(g, true);
     foreach (Transform child in g.transform)
     {
         RecordRecursive(child.gameObject);
     }
 }
Пример #2
0
        public static void ReassignRecursive(GameObject g)
        {
            ImageSpriteReassign imageSpriteReassign = g.GetComponent <ImageSpriteReassign>();

            if (imageSpriteReassign != null)
            {
                imageSpriteReassign.ReAssign();
//                Object.DestroyImmediate(imageSpriteReassign, true);
            }
            TextFontReassign textFontReassign = g.GetComponent <TextFontReassign>();

            if (textFontReassign != null)
            {
                textFontReassign.ReAssign();
//                Object.DestroyImmediate(textFontReassign, true);
            }
            foreach (Transform v in g.transform)
            {
                ReassignRecursive(v.gameObject);
            }
        }