【m】1111
This commit is contained in:
30
Assets/06.UIFarme/Editor/Tweening/TweenPositionEditor.cs
Normal file
30
Assets/06.UIFarme/Editor/Tweening/TweenPositionEditor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenPosition))]
|
||||
public class TweenPositionEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenPosition tw = target as TweenPosition;
|
||||
GUI.changed = false;
|
||||
|
||||
Vector3 from = EditorGUILayout.Vector3Field("From", tw.from);
|
||||
Vector3 to = EditorGUILayout.Vector3Field("To", tw.to);
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user