River Jiang
2020-10-27 79e652bedf62f0842f59a2323f139f2e90efe819
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
namespace GAP_ParticleSystemController{
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
 
    #if UNITY_EDITOR
    using UnityEditor;
 
    [CustomEditor(typeof(ParticleSystemController))]
    public class ParticleSystemControllerEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
 
            ParticleSystemController psCtrl = (ParticleSystemController)target;
 
            if (GUILayout.Button ("Fill Lists")) 
            {
                psCtrl.FillLists ();
            }
            if (GUILayout.Button ("Empty Lists")) 
            {
                psCtrl.EmptyLists ();
            }
            if(GUILayout.Button("Apply"))
            {
                psCtrl.UpdateParticleSystem();
            }
            if(GUILayout.Button("Reset"))
            {
                psCtrl.ResetParticleSystem();
            }
        }
    }
    #endif
}