获取所有变量名的字符串

 System.Reflection.MemberInfo[] ne = this.GetType().GetMembers();
        print(ne.Length);
        for (int i = 0; i < ne.Length; i++)
        {
            print(ne[i].Name);
        }
参考链接:https://www.cnblogs.com/yaozhenfa/p/CSharp_Reflection_1.html

你可能感兴趣的:(Unity,萌新备忘录,unity3d)