Animation View Custom Property Editor?

Hello,

Can a custom editor be written for properties in the animation view?

From what I can tell, there is no way to set a parameter on a child’s animator from within the animation timeline. If I’m just unaware of a more standard solution, please let me know. Animation events are not a solution for us because that would require more pre-setup than (should be) necessary.

The solution I came up with is the component below. Changing a float in the timeline triggers OnDidApplyAnimationProperties which then makes the appropriate call to the animator on the same GameObject. Obviously, it would be much nicer (and less error prone) to select the name of the parameter from a drop down list rather than visually typing the number.

Use-case:

  1. Login screen intro animation begins
  2. Keyframe in login screen intro animation tells the login button to *play its own animation
  • The button is a prefab with its own set of animations which is used throughout the game.

using UnityEngine;
using System.Collections.Generic;

[RequireComponent(typeof(Animator))]
public class AnimationTrigger : MonoBehaviour
{
[HideInInspector]
public float ParameterIndex = -1;
[HideInInspector]
public List ParameterNames = new List();
private Animator _animator;

private void Awake()
{
_animator = GetComponent();
var parms = _animator.parameters;
for (var i = 0; i < parms.Length; i++)
{
ParameterNames.Add(parms*.name);*
}
}

public void OnDidApplyAnimationProperties()
{
if (ParameterIndex > -1)
_animator.SetTrigger(ParameterNames[(int)ParameterIndex]);
}
}

Anyone? Has anyone ever attempted extending the animation view?