10using System.Collections;
11using System.Collections.Generic;
17 [CanEditMultipleObjects]
31 private void drawEventTable(SerializedProperty property) {
32 if (_tableEditor ==
null) {
43 EditorGUI.BeginDisabledGroup(
target.targetTransform ==
null
44 ||
target.startTransform ==
null
45 || Utils.IsObjectPartOfPrefabAsset(
target.gameObject));
47 EditorGUILayout.BeginHorizontal();
49 if (GUILayout.Button(
new GUIContent(
"Set Target" + (
targets.Length > 1 ?
"s" :
"") +
" To Start",
50 "If this TransformTweenBehaviour has a valid target and start transform, "
51 +
"you can press this button to set the target transform to the start state."))) {
52 Undo.IncrementCurrentGroup();
53 Undo.SetCurrentGroupName(
"Set Target(s) To Start");
54 foreach (var individualTarget
in targets) {
55 Undo.RecordObject(individualTarget.targetTransform,
"Move Target To Start");
56 individualTarget.SetTargetToStart();
60 EditorGUI.EndDisabledGroup();
62 EditorGUI.BeginDisabledGroup(
target.targetTransform ==
null
63 ||
target.endTransform ==
null
64 || Utils.IsObjectPartOfPrefabAsset(
target.gameObject));
66 if (GUILayout.Button(
new GUIContent(
"Set Target" + (
targets.Length > 1 ?
"s" :
"") +
" To End",
67 "If this TransformTweenBehaviour has a valid target and end transform, "
68 +
"you can press this button to set the target transform to the end state."))) {
69 Undo.IncrementCurrentGroup();
70 Undo.SetCurrentGroupName(
"Set Target(s) To End");
71 foreach (var individualTarget
in targets) {
72 Undo.RecordObject(individualTarget.targetTransform,
"Move Target To End");
73 individualTarget.SetTargetToEnd();
77 EditorGUILayout.EndHorizontal();
79 EditorGUI.EndDisabledGroup();
81 base.OnInspectorGUI();
void dontShowScriptField()
void deferProperty(string propertyName)
Defer rendering of a property until the end of the inspector. Deferred properties are drawn in the RE...
void drawScriptField(bool disable=true)
void specifyCustomDrawer(string propertyName, Action< SerializedProperty > propertyDrawer)
Specify a callback to be used to draw a specific named property. Should be called in OnEnable.