Hallo,
I want use new Animation Editor,but i have follow message by Animation Events: "Function Not Supported".Any idea how can i solve this problem?
Unity Community |

Hallo,
I want use new Animation Editor,but i have follow message by Animation Events: "Function Not Supported".Any idea how can i solve this problem?
Yes,i have message and it print this message sometime.The function execute sometime too.The event is in last frame and animation play once.Maybe sometime last frame ignore.
Hi,
i have the same problem.
Where does the script-function has to be placed or is it regardless and i can define a function which is not a component of the selected gameobject with its animations?
I get no prints or Debug.Logs, so i wonder what i have to get this thing run...
Thanks
The function gets called on any component attached to the same game object the animation component is attached to.
If the function is not implemented, then I guess it means that no component exists that can catch the named function. Normally you can only create an event that calls a function that already exists, but the connection can be lost if you move animations or attach/detach components.
It works similar to a SendMessage.
Thanks for your reply.
I supposed to that so i added a new script to that gameobject. In that script is my testfunction with print-output. But it doesn´t work.
Any ideas?
could you provide the script that you use on the said game object?
I used the animation editor to create a few camera fly through with timed actions and didn't have any problems.
The function I used were defined as
Code:
public void MyFunctionThatDoesSomething() { ... }
in a MonoBehaviour extended class
A JS counterpart would be
just in about any js file as js declarations are public by default and void can be omited as return typeCode:
function MyFunctionThatDoesSomething() { ... }
If you enter the functions dreamora put, you should see the function name appear in the dropdown when you add a new animation event.
If the function does appear in the dropdown, then the only reason I can think of is that your animation is playing while outside the camera frustum, and "Animate only if visible" is true.
Mhh, i started the gamemode with this example i mentioned and although the message "..function not supported" is shown, the print output is now correct. Also with parameters and it works if the "Test"-Component is not enabled, too. Strange...
thats not strange, thats expected.
enabled only impacts start and the "onXY" automatic callbacks not the rest that works through the message / invoke paths.
animationevents actually are SendMessage as mentioned above and in the script reference![]()
I have a problem when I have two different scripts attached to the gameobject. Only functions in the first (first to be added to the gameobject) script can be called from Animation Event. Functions in the second script are flagged as "Function not supported".
That is a limitation of the animation editor currently. You could request multiple scripts as a feature (menu: Help > Report A Problem).Originally Posted by Hilmer
Only functions in the first (first to be added to the gameobject) script can be called from Animation Event.
I'm wired to the world... that's how I... know... everything...
Is this going to get fixed any time soon? I've just run into this bug and it's kind of ridiculous. There's no way to re-order the scripts in the inspector so I have to remove all the scripts and then re-add the one with the functions I want first. Absurd.