Unity Community

Register or Sign In:

+ Reply to Thread
Results 1 to 14 of 14

  1. Posts
    17

    Animation Editor (Function not supported)

    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?
    Attached Images  


  2. Location
    Newcastle, Australia
    Posts
    49
    Hi

    Have you tried adding some log message in to see if the events are actually getting called.

    Code:  
    1. Debug.Log("Called from animation");

    I had a similar error where it said the function was not supported, but seemed to call it just fine regardless.

    Cheers


  3. Posts
    17
    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.


  4. Posts
    141
    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


  5. Posts
    514
    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.


  6. Posts
    141
    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?


  7. Location
    Zürich, Switzerland
    Posts
    25,088
    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:  
    1. public void MyFunctionThatDoesSomething() {
    2. ...
    3. }

    in a MonoBehaviour extended class

    A JS counterpart would be

    Code:  
    1. function MyFunctionThatDoesSomething() {
    2. ...
    3. }
    just in about any js file as js declarations are public by default and void can be omited as return type


  8. Posts
    514
    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.


  9. Posts
    141
    I attached a screenshot which shows the "Test"-Component with the following function:

    Code:  
    1. function printout (value : float) {
    2.     print("value: " + value);
    3. }

    Thanks for your help.
    Nice to have such an active community.
    Attached Images  


  10. Posts
    141
    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...


  11. Location
    Zürich, Switzerland
    Posts
    25,088
    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


  12. Posts
    6
    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".

  13. Administrator
    Location
    Blackpool, United Kingdom
    Posts
    8,593
    Quote Originally Posted by Hilmer
    Only functions in the first (first to be added to the gameobject) script can be called from Animation Event.
    That is a limitation of the animation editor currently. You could request multiple scripts as a feature (menu: Help > Report A Problem).
    I'm wired to the world... that's how I... know... everything...


  14. Posts
    18
    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.