private void RenderAddAnimatablePropertyMenuButton(string stateContainerName, int animationTargetIndex) { using (new EditorGUILayout.HorizontalScope()) { animatableProperty = (AnimatableProperty)EditorGUILayout.EnumPopup(animatableProperty); if (GUILayout.Button("Add the " + animatableProperty.ToString() + " Animatable Property")) { CreateAnimatablePropertyInstance(stateContainerName, animatableProperty.ToString(), animationTargetIndex); serializedObject.ApplyModifiedProperties(); } } }
public void SetCurve(AnimatableProperty property, List <AnimationKey> keys) { if (!curves.TryGetValue(property, out Curve curve)) { Debug.LogError("Curve not found : " + transform.name + " " + property.ToString()); return; } curve.SetKeys(keys); }