- Home /
Animation Event - "Function not supported"
I'm using Unity's Animation Editor to activate events based on the time of an animation. However, for every script that I try to add to the Event, there is a "(Function not supported)" next to it. The event still seems to fire, but I was wondering what this meant, and is there a way to make it go away?
If it doesnt effect on your game, let it be. Incase you notice things working oddly Then try to make it go away.
Answer by antonklock · Sep 16, 2011 at 02:03 AM
I have the same problem and I found that the functions in first script on the object seem to be supported but when you try to call functions from any script after that it gives you the "(Function not supported)" message.
But as TaigaStudios said, if it doesn't effect your game you should be fine.
Answer by mamoniem · Oct 30, 2012 at 07:22 AM
you need to pass the function name as string at the beggining , here is my test script & it works with me :
#pragma strict
function Update () {
var dodoEvent = new AnimationEvent();
dodoEvent.functionName = "dodo";
if (Input.GetKeyDown(KeyCode.UpArrow)){
//Debug.Log ("the button pressed");
animation["testANimBall"].clip.AddEvent(dodoEvent);
}
}
function dodo(){
Debug.Log (System.DateTime.Now.Second);
}
i added a debug.Log jut to test at the begginging; sorry if the psot wwas old, but i posted the answer to anyone want to use the same thing later;
m;
I $$anonymous$$nown !Thank You! I had one bad custom,writ code!