mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
7371e889ad
# [4.0.0-preview.8](https://github.com/mob-sakai/UIEffect/compare/v4.0.0-preview.7...v4.0.0-preview.8) (2020-06-04) ### change * change namespace ([7f4190c](https://github.com/mob-sakai/UIEffect/commit/7f4190c8c6f294e90869767a96194ec5ac4ba57f)) ### Features * modify EffectPlayer at runtime ([8483ba6](https://github.com/mob-sakai/UIEffect/commit/8483ba63cb546ca032915c166c0333fa5fd7aa76)), closes [#214](https://github.com/mob-sakai/UIEffect/issues/214) [#215](https://github.com/mob-sakai/UIEffect/issues/215) ### BREAKING CHANGES * If your code contained the UIEffect API, it would fail to compile. Please change the namespace from to .
54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using UnityEditor;
|
|
using UnityEditorInternal;
|
|
using UnityEngine;
|
|
using System.Linq;
|
|
|
|
namespace Coffee.UIEffects.Editors
|
|
{
|
|
/// <summary>
|
|
/// UIEffect editor.
|
|
/// </summary>
|
|
[CustomEditor(typeof(UIHsvModifier))]
|
|
[CanEditMultipleObjects]
|
|
public class UIHsvModifierEditor : Editor
|
|
{
|
|
SerializedProperty _spTargetColor;
|
|
SerializedProperty _spRange;
|
|
SerializedProperty _spHue;
|
|
SerializedProperty _spSaturation;
|
|
SerializedProperty _spValue;
|
|
|
|
/// <summary>
|
|
/// This function is called when the object becomes enabled and active.
|
|
/// </summary>
|
|
protected void OnEnable()
|
|
{
|
|
_spTargetColor = serializedObject.FindProperty("m_TargetColor");
|
|
_spRange = serializedObject.FindProperty("m_Range");
|
|
_spHue = serializedObject.FindProperty("m_Hue");
|
|
_spSaturation = serializedObject.FindProperty("m_Saturation");
|
|
_spValue = serializedObject.FindProperty("m_Value");
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Implement this function to make a custom inspector.
|
|
/// </summary>
|
|
public override void OnInspectorGUI()
|
|
{
|
|
serializedObject.Update();
|
|
|
|
//================
|
|
// Effect setting.
|
|
//================
|
|
EditorGUILayout.PropertyField(_spTargetColor);
|
|
EditorGUILayout.PropertyField(_spRange);
|
|
EditorGUILayout.PropertyField(_spHue);
|
|
EditorGUILayout.PropertyField(_spSaturation);
|
|
EditorGUILayout.PropertyField(_spValue);
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
}
|
|
}
|
|
}
|