Skip to content

Commit 2d6839e

Browse files
committed
Merge branch 'release/1.0'
2 parents 67f5c28 + 632dc85 commit 2d6839e

File tree

193 files changed

+3679
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3679
-3
lines changed

Assets/AdncAnimatorHelpers.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AdncAnimatorHelpers/Editor.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AdncAnimatorHelpers/Editor/Scripts.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AdncAnimatorHelpers/Editor/Scripts/CustomEditors.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AdncAnimatorHelpers/Editor/Scripts/CustomEditors/AnimatorPlayback.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEditor;
4+
using UnityEngine;
5+
6+
namespace Adnc.AnimatorHelpers.Editors.CustomEditors {
7+
[CustomEditor(typeof(AnimatorPlayback))]
8+
public class AnimatorPlaybackEditor : Editor {
9+
private SortableListAnimatorVariable _listBools;
10+
private SortableListAnimatorVariable _listFloats;
11+
private SortableListAnimatorVariable _listInts;
12+
private SortableListAnimatorVariable _listTriggers;
13+
14+
private void OnEnable () {
15+
_listBools = new SortableListAnimatorVariable(this, "bools", "Set Bools");
16+
_listFloats = new SortableListAnimatorVariable(this, "floats", "Set Floats");
17+
_listInts = new SortableListAnimatorVariable(this, "ints", "Set Ints");
18+
_listTriggers = new SortableListAnimatorVariable(this, "triggers", "Set Triggers");
19+
}
20+
21+
public override void OnInspectorGUI () {
22+
serializedObject.Update();
23+
24+
_listBools.Update();
25+
_listFloats.Update();
26+
_listInts.Update();
27+
_listTriggers.Update();
28+
29+
var propWait = serializedObject.FindProperty("waitForCondition");
30+
EditorGUILayout.PropertyField(propWait);
31+
32+
if (propWait.boolValue) {
33+
var propCondition = serializedObject.FindProperty("conditions");
34+
EditorGUILayout.PropertyField(propCondition, true);
35+
}
36+
37+
serializedObject.ApplyModifiedProperties();
38+
}
39+
}
40+
}

Assets/AdncAnimatorHelpers/Editor/Scripts/CustomEditors/AnimatorPlayback/AnimatorPlaybackEditor.cs.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using Adnc.Utility.Editors;
4+
using UnityEditor;
5+
using UnityEngine;
6+
7+
namespace Adnc.AnimatorHelpers.Editors.CustomEditors {
8+
public class SortableListAnimatorVariable : SortableListBase {
9+
public SortableListAnimatorVariable (Editor editor, string property, string title) : base(editor, property, title) {
10+
_list.drawElementCallback = (rect, index, active, focused) => {
11+
var element = _serializedProp.GetArrayElementAtIndex(index);
12+
var propName = element.FindPropertyRelative("name");
13+
var propValue = element.FindPropertyRelative("value");
14+
15+
rect.height -= EditorGUIUtility.standardVerticalSpacing;
16+
17+
if (propValue != null) {
18+
var col1 = rect;
19+
col1.width /= 2;
20+
col1.width -= EditorGUIUtility.standardVerticalSpacing;
21+
EditorGUI.PropertyField(col1, propName, new GUIContent());
22+
23+
var col2 = col1;
24+
col2.x += col1.width + EditorGUIUtility.standardVerticalSpacing;
25+
EditorGUI.PropertyField(col2, propValue, new GUIContent());
26+
} else {
27+
EditorGUI.PropertyField(rect, propName, new GUIContent());
28+
}
29+
};
30+
}
31+
}
32+
}
33+

Assets/AdncAnimatorHelpers/Editor/Scripts/CustomEditors/AnimatorPlayback/SortableListAnimatorVariable.cs.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AdncAnimatorHelpers/Editor/Testing.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)