Answered

Sending animation event

Anonymous 4 months ago updated by Peter - Soxware Developer 4 months ago 1

Hi


I'm not sure if this is a Playmaker issued but as  I'm using uMotion I decided to ask here first.


I need to send animation event to Playmaker.


  1. Select the GameObject.
  2. Open the Animation Window: Main Menu > Window > Animation.
  3. Add or select an animation on the GameObject.
  4. Add an Animation Event to the timeline.
  5. Select the SendEvent(string) function.
  6. Enter the event to send.

I can get to the step 5 but SendEvent cannot be found from the list. I also noticed this:

What do I need to do to get access to the SendEvent event or is it even possible?

UMotion Version:
1.22p04
Unity Version:
2019.3.15f1

Answer

Answer
Answered

Hi,
thank you very much for your support request.


This warning is just informational. UMotion runs through all scripts that are not in a custom assembly (i.e. are not using an assembly definition file) and checks if it finds a method with the name that you've entered. If it does not find it, it shows this warning. Unity can still invoke this method if it is in a different assembly, it's just UMotion that doesn't check other assemblies.


In order for animation events to be triggered correctly, just make sure that you've assigned your script to the animated GameObject and that the event name and parameter type that you configured for the animation event in UMotion is exactly the same (case sensitive!) as in your script. When changing something in UMotion, you always need to re-export your animation.


Here is the UMotion animation event tutorial:


Please let me know in case you have any follow-up questions.


Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.


This warning is just informational. UMotion runs through all scripts that are not in a custom assembly (i.e. are not using an assembly definition file) and checks if it finds a method with the name that you've entered. If it does not find it, it shows this warning. Unity can still invoke this method if it is in a different assembly, it's just UMotion that doesn't check other assemblies.


In order for animation events to be triggered correctly, just make sure that you've assigned your script to the animated GameObject and that the event name and parameter type that you configured for the animation event in UMotion is exactly the same (case sensitive!) as in your script. When changing something in UMotion, you always need to re-export your animation.


Here is the UMotion animation event tutorial:


Please let me know in case you have any follow-up questions.


Best regards,
Peter