示例#1
0
 /// <summary>
 /// 绘制公共功能按钮
 /// </summary>
 void DrawCFButton()
 {
     EditorGUILayout.HelpBox("Preview预览,Reset按钮执行清空下列所有数值", MessageType.Info, true);
     //GUILayout.Label("Preview预览,Reset按钮执行清空下列所有数值");
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("Preview", GUILayout.Height(20)))
     {
         itemDataSet.Preview();
     }
     if (GUILayout.Button("Reset", GUILayout.Height(20)))
     {
         var canReset = EditorUtility.DisplayDialog("Reset ScriptableObject", "You will reset ScriptableObject Properties", "Reset", "Cancel");
         if (canReset)
         {
             itemDataSet.Reset();
         }
     }
     GUILayout.EndHorizontal();
 }