A little tip my friend,
Try creating a script (and attaching it) for your gameObject so that at the start of it (using C# it would be VOID START) you can use EventDelegate.add (are you aware of that?).
Example =
UIPlayAnimation AnimControl = gameObject.getComponent<UIPlayAnimation>();
EventDelegate.add (or set if it's only one, not your case XD) (AnimControl.onChange, doSomeCode);
void doSomeCode(){
//TYPE YOUR CODE IN HERE
}
I believe that practice-wise this is much better than using Unity's IDE for a task that isn't overly complicated. If you need more help you can mail me and I can send you a more pratical approach of an answer (such as a prototype project).
Hope it helps you!

email = marcosviniciusdreher@hotmail.com