29 lines
1012 B
C#
29 lines
1012 B
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
[CustomEditor(typeof(CameraRainDrops3D))]
|
|
public class CRD_inspector : Editor
|
|
{
|
|
SerializedProperty EnableRainTrails,
|
|
RainDropsIntensity;
|
|
|
|
void OnEnable()
|
|
{
|
|
EnableRainTrails = serializedObject.FindProperty("EnableRainTrails");
|
|
RainDropsIntensity = serializedObject.FindProperty("RainDropsIntensity");
|
|
}
|
|
|
|
public override void OnInspectorGUI(){
|
|
var button = GUILayout.Button("Click for more tools");
|
|
if (button) Application.OpenURL("https://assetstore.unity.com/publishers/39163");
|
|
EditorGUILayout.Space(5);
|
|
|
|
CameraRainDrops3D script = (CameraRainDrops3D)target;
|
|
|
|
EditorGUILayout.PropertyField(EnableRainTrails, new GUIContent("Enable Rain Trails", "Turn rain drop trails on or off"));
|
|
EditorGUILayout.PropertyField(RainDropsIntensity, new GUIContent("Rain Drops Intensity", "Set the intensity of the rain drops"));
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
}
|