Ejemplo n.º 1
0
        public static int Get括号内的Index(Transform tran)
        {
            string str = tran.name;

            str = str.Remove(str.Length - 1, 1);
            string[] strS = str.Split('(');
            str = strS[strS.Length - 1];
            int index = 0;

            if (U_String.Is数字(str))
            {
                index = int.Parse(str);
            }
            else
            {
                Debug.LogError("不符合末尾英文括号+数字的命名规则");
            }
            return(index);
        }