protected override void OnInspectorGUI() { GPActionVector2ComponentAnimation action = (GPActionVector2ComponentAnimation)TargetAction; // Provider A EditorGUILayout.LabelField("Variable"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <Vector2>(); m_providerAEditor.Provider = action._provider; } if (m_providerAEditor.Provider != action._provider) { m_providerAEditor.Provider = action._provider; } m_providerAEditor.Display(); EditorGUI.indentLevel--; action._component = (Vector2Component)EditorGUILayout.EnumPopup("Component", action._component); action._duration = EditorGUILayout.FloatField("Duration", action._duration); action._curve = EditorGUILayout.CurveField("Curve", action._curve); }
protected override void OnInspectorGUI() { GPActionFloatAnimation action = (GPActionFloatAnimation)TargetAction; // Provider A EditorGUILayout.LabelField("Variable"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <float>(); m_providerAEditor.Provider = action._provider; } if (m_providerAEditor.Provider != action._provider) { m_providerAEditor.Provider = action._provider; } m_providerAEditor.Display(); EditorGUI.indentLevel--; EditorGUILayout.PropertyField(SerialObject.FindProperty("_duration")); EditorGUILayout.PropertyField(SerialObject.FindProperty("_curve")); SerialObject.ApplyModifiedProperties(); }
protected override void OnInspectorGUI() { GPConditionCompareTag compare = (GPConditionCompareTag)Condition; // Provider EditorGUILayout.LabelField("Object"); EditorGUI.indentLevel++; if (m_providerEditor == null) { m_providerEditor = new ValueProviderEditor <GameObject>(); m_providerEditor.Provider = compare._objectProvider; } if (m_providerEditor.Provider != compare._objectProvider) { m_providerEditor.Provider = compare._objectProvider; } m_providerEditor.Display(); EditorGUI.indentLevel--; EditorGUILayout.LabelField("Object"); EditorGUI.indentLevel++; compare._tag = EditorGUILayout.TagField("Tag", compare._tag); EditorGUI.indentLevel--; }
protected override void OnInspectorGUI() { GPConditionCompareString compare = (GPConditionCompareString)Condition; // Comparer if (m_comparerEditor == null) { m_comparerEditor = new ValueComparerEditor <string>(); } compare._comparerType.Type = m_comparerEditor.Display(compare._comparerType.Type); // Provider A EditorGUILayout.LabelField("Value A"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <string>(); m_providerAEditor.Provider = compare._providerA; } if (m_providerAEditor.Provider != compare._providerA) { m_providerAEditor.Provider = compare._providerA; } m_providerAEditor.Display(); EditorGUI.indentLevel--; // Provider B EditorGUILayout.LabelField("Value B"); EditorGUI.indentLevel++; if (m_providerBEditor == null) { m_providerBEditor = new ValueProviderEditor <string>(); m_providerBEditor.Provider = compare._providerB; } if (m_providerBEditor.Provider != compare._providerB) { m_providerBEditor.Provider = compare._providerB; } m_providerBEditor.Display(); EditorGUI.indentLevel--; }
protected override void OnInspectorGUI() { GPActionSetVector4Component action = (GPActionSetVector4Component)TargetAction; action._component = (Vector4Component)EditorGUILayout.EnumPopup("Component", action._component); // Provider A EditorGUILayout.LabelField("Variable"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <Vector4>(); m_providerAEditor.Provider = action._variable; } if (m_providerAEditor.Provider != action._variable) { m_providerAEditor.Provider = action._variable; } m_providerAEditor.Display(); EditorGUI.indentLevel--; // Provider B EditorGUILayout.LabelField("Value"); EditorGUI.indentLevel++; if (m_providerBEditor == null) { m_providerBEditor = new ValueProviderEditor <float>(); m_providerBEditor.Provider = action._newValue; } if (m_providerBEditor.Provider != action._newValue) { m_providerBEditor.Provider = action._newValue; } m_providerBEditor.Display(); EditorGUI.indentLevel--; }
protected override void OnInspectorGUI() { GPActionSetVector3 action = (GPActionSetVector3)TargetAction; // Provider A EditorGUILayout.LabelField("Variable"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <Vector3>(); m_providerAEditor.Provider = action._variable; } if (m_providerAEditor.Provider != action._variable) { m_providerAEditor.Provider = action._variable; } m_providerAEditor.Display(); EditorGUI.indentLevel--; // Provider B EditorGUILayout.LabelField("Value"); EditorGUI.indentLevel++; if (m_providerBEditor == null) { m_providerBEditor = new ValueProviderEditor <Vector3>(); m_providerBEditor.Provider = action._newValue; } if (m_providerBEditor.Provider != action._newValue) { m_providerBEditor.Provider = action._newValue; } m_providerBEditor.Display(); EditorGUI.indentLevel--; }
protected override void OnInspectorGUI() { GPConditionCompareDistance compare = (GPConditionCompareDistance)Condition; // Comparer if (m_comparerEditor == null) { m_comparerEditor = new ValueComparerEditor <float>(); } compare._comparerType.Type = m_comparerEditor.Display(compare._comparerType.Type); // Provider A EditorGUILayout.LabelField("Object A"); EditorGUI.indentLevel++; if (m_providerAEditor == null) { m_providerAEditor = new ValueProviderEditor <GameObject>(); m_providerAEditor.Provider = compare._providerA; } if (m_providerAEditor.Provider != compare._providerA) { m_providerAEditor.Provider = compare._providerA; } m_providerAEditor.Display(); EditorGUI.indentLevel--; // Provider B EditorGUILayout.LabelField("Object B"); EditorGUI.indentLevel++; if (m_providerBEditor == null) { m_providerBEditor = new ValueProviderEditor <GameObject>(); m_providerBEditor.Provider = compare._providerB; } if (m_providerBEditor.Provider != compare._providerB) { m_providerBEditor.Provider = compare._providerB; } m_providerBEditor.Display(); EditorGUI.indentLevel--; // Distance EditorGUILayout.LabelField("Compare To"); EditorGUI.indentLevel++; if (m_providerDistanceEditor == null) { m_providerDistanceEditor = new ValueProviderEditor <float>(); m_providerDistanceEditor.Provider = compare._distance; } if (m_providerDistanceEditor.Provider != compare._distance) { m_providerDistanceEditor.Provider = compare._distance; } m_providerDistanceEditor.Display(); EditorGUI.indentLevel--; }