Пример #1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EditorGUILayout.PropertyField(serializedObject.FindProperty("defaultSettings"), true);

            MeshSplatterManager sm = target as MeshSplatterManager;

            if (sm.defaultSettings == null)
            {
                if (GUILayout.Button("Create new settings"))
                {
                    SplatterSettings ss = CustomAssetMaker.CreateAsset <SplatterSettings>("New SplatterSettings");
                    sm.defaultSettings = ss;
                }
            }

            sm.advancedSettings = EditorGUILayout.Toggle("Advanced settings", sm.advancedSettings);
            var psObject = sm.gameObject.transform.FindChild("Particle System");

            if (psObject != null)
            {
                if (sm.advancedSettings && psObject.hideFlags == HideFlags.HideInHierarchy)
                {
                    psObject.hideFlags = HideFlags.None;
                    EditorApplication.RepaintHierarchyWindow();
                }
                if (!sm.advancedSettings && psObject.hideFlags != HideFlags.HideInHierarchy)
                {
                    psObject.hideFlags = HideFlags.HideInHierarchy;
                    EditorApplication.RepaintHierarchyWindow();
                }
            }

            serializedObject.ApplyModifiedProperties();
        }
 public static void CreateAudioClipData()
 {
     CustomAssetMaker.CreateAsset <AudioClipData>("New AudioClipData");
 }
Пример #3
0
 public static void CreateSplatterSettings()
 {
     CustomAssetMaker.CreateAsset <SplatterSettings>("New SplatterSettings");
 }
Пример #4
0
 public static void CreateFont()
 {
     CustomAssetMaker.CreateAsset <UIFont>("New UIFont");
 }
Пример #5
0
 public static void CreateLighting()
 {
     CustomAssetMaker.CreateAsset <TimeOfDayLighting>("New TimeOfDayLighting");
 }