diff options
author | chai <chaifix@163.com> | 2021-05-26 22:39:25 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-05-26 22:39:25 +0800 |
commit | 9ff19bb9f048e74670b6292889edc54ae47c61fe (patch) | |
tree | 021661bed25dc3afe724e0487b4f99e488fafd71 /Assets/UI_Extension/Scripts | |
parent | 117938ecaece43c584ee74723a36d8dc2f2a4ae1 (diff) |
*misc
Diffstat (limited to 'Assets/UI_Extension/Scripts')
6 files changed, 43 insertions, 54 deletions
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs index f98c47d..e0f2b9a 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs @@ -9,66 +9,24 @@ namespace TweenAnimation [CustomEditor(typeof(TweenAnimation), false)]
public partial class TweenAnimationInspector : Editor
{
-
-
- public override void OnInspectorGUI()
+ private TweenModuleGUIStyles styles
{
- TweenAnimation tween = target as TweenAnimation;
-
- EditorGUILayout.LabelField("Tween Alpha", TweenModuleGUIStyles.Get().moduleHeaderStyle);
- // GUILayout.Button("button", "ProfilerBadge");
- //DrawProObjectField<TweenAnimation>(new GUIContent(""), tween, typeof(TweenAnimation), TweenModuleGUIStyles.Get().objectField, false);
-
- Rect rect = GUILayoutUtility.GetRect(100, 25f);
-
- bool result = GUI.Toggle(rect, true, "content", TweenModuleGUIStyles.Get().moduleHeaderStyle);
- rect = GUILayoutUtility.GetRect(100, 25f);
-
- GUI.Button(rect, "", "OL Plus");
- rect.y += 20;
- GUI.Button(rect, "", "OL Minus");
- }
- public static void DrawProObjectField<T>(
- GUIContent label,
- SerializedProperty value,
- Type objType,
- GUIStyle style,
- bool allowSceneObjects,
- Texture objIcon = null,
- params GUILayoutOption[] options) where T : UnityEngine.Object
- {
-
- T tObj = value.objectReferenceValue as T;
-
- if (objIcon == null)
- {
- objIcon = EditorGUIUtility.FindTexture("PrefabNormal Icon");
- }
- style.imagePosition = ImagePosition.ImageLeft;
-
- int pickerID = 455454425;
-
- if (tObj != null)
+ get
{
- EditorGUILayout.LabelField(label,
- new GUIContent(tObj.name, objIcon), style, options);
+ return TweenModuleGUIStyles.Get();
}
+ }
- if (GUILayout.Button("Select"))
- {
- EditorGUIUtility.ShowObjectPicker<T>(
- tObj, allowSceneObjects, "", pickerID);
+ public void Awake()
+ {
+ }
- }
- if (Event.current.commandName == "ObjectSelectorUpdated")
- {
- if (EditorGUIUtility.GetObjectPickerControlID() == pickerID)
- {
- tObj = EditorGUIUtility.GetObjectPickerObject() as T;
- value.objectReferenceValue = tObj;
- }
- }
+ public override void OnInspectorGUI()
+ {
+ TweenAnimation tween = target as TweenAnimation;
+ GUILayout.Label("content", styles.editableLabel);
+ GUILayout.Label("content", styles.editableLabel);
}
}
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs new file mode 100644 index 0000000..9819014 --- /dev/null +++ b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs @@ -0,0 +1,13 @@ +using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public static class TweenModuleUI
+{
+ public static float GUIFloat(GUIContent guiContent, float floatValue, string formatString, params GUILayoutOption[] layoutOptions)
+ {
+
+ return floatValue;
+ }
+
+}
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs.meta b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs.meta new file mode 100644 index 0000000..80bc82f --- /dev/null +++ b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenModuleUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df8732181e7474c4eb4dda361b8f837d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/TweenAnimation.cs b/Assets/UI_Extension/Scripts/Animation/Tween/TweenAnimation.cs index bd0bae6..93b5b17 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/TweenAnimation.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/TweenAnimation.cs @@ -9,6 +9,8 @@ namespace TweenAnimation [DisallowMultipleComponent]
public class TweenAnimation : MonoBehaviour
{
+
+
public List<TweenModule> modules;
public UnityEvent onPlayEnd;
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/TweenController.cs b/Assets/UI_Extension/Scripts/Animation/Tween/TweenController.cs index c30cf78..e636f23 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/TweenController.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/TweenController.cs @@ -14,6 +14,8 @@ namespace TweenAnimation public class TweenController : MonoBehaviour
{
+ public AnimationCurve curve;
+
public List<TweenState> animations;
// Use this for initialization
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule.cs b/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule.cs index 65cde40..3d4968a 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/TweenModule.cs @@ -8,6 +8,9 @@ namespace TweenAnimation [Serializable]
public abstract class TweenModule
{
+ public string description;
+
+ public bool enabled;
#if UNITY_EDITOR
public abstract string name { get; }
|