Exemplo n.º 1
0
        private void DrawOtherInfo()
        {
            ShowUtil.DrawTitle("其他配置", Color.yellow);

            EditorGUIUtility.labelWidth = 250f;
            EditorGUI.indentLevel      += 2;
            //角色层级
            GUILayout.BeginHorizontal();
            charater.layer = EditorGUILayout.LayerField("角色层级", charater.layer);
            if (GUILayout.Button("设置", GUILayout.Width(120f)))
            {
                charater.layer = Const.LAYER_CHARACTER_MOVER;
            }
            GUILayout.EndHorizontal();
            //骨骼数
            bonePre = EditorGUILayout.TextField("骨骼前缀", bonePre);
            GUILayout.BeginHorizontal();
            EditorGUILayout.IntField("骨骼数", spriteInfo.boneCount);
            if (GUILayout.Button("设置", GUILayout.Width(120f)))
            {
                spriteInfo.boneCount = Utils.CalcBoneCount(charater, bonePre);
            }
            GUILayout.EndHorizontal();
            //面数
            GUILayout.BeginHorizontal();
            EditorGUILayout.IntField("模型面数", spriteInfo.trisCount);
            if (GUILayout.Button("设置", GUILayout.Width(120f)))
            {
                spriteInfo.trisCount = Utils.CalcTriCount(charater);
            }
            GUILayout.EndHorizontal();
            EditorGUI.indentLevel -= 2;
        }