public class GameMainMenu : UIClass { public class JetPack : UIClass { public static UIPath UIPath = new UIPath("UIPrefabs/GameMainMenu/JetPack/JetPack.prefab"); } }
BindingFlags flag = BindingFlags.Static | BindingFlags.Public; Type type = Type.GetType("GameMainMenu+JetPack"); System.Reflection.FieldInfo key = type.GetField("UIPath", flag); Debug.Log((key.GetValue(null) as UIPath).ToString());