Esempio n. 1
0
 /// <summary>
 /// 更新编辑器中的模型信息
 /// </summary>
 private void UpdateModel()
 {
     if (model && model.gameObject && model.gameObject.activeSelf)
     {
         model.UpdateInEditor(ColaGUIEditor.GetScreenPixelDimensions());
     }
 }
        public void DrawColaFrameworkUI()
        {
            GUILayout.BeginHorizontal("HelpBox");
            EditorGUILayout.LabelField("== UI相关辅助 ==");
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("创建NewUIView", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30)))
            {
                ColaGUIEditor.CreateColaUIView();
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (GUILayout.Button("创建C#版UIView脚本", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30)))
            {
                CreateScriptsEditor.CreateCSharpUIView();
            }
            if (GUILayout.Button("创建C#版Module脚本", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30)))
            {
                CreateScriptsEditor.CreateCSharpModule();
            }
            if (GUILayout.Button("创建C#版Templates(UIView和Module)", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30)))
            {
                CreateScriptsEditor.CreateCSharpModule();
            }
            GUILayout.EndHorizontal();
        }