playMaker

Author Topic: Animation events appear to be heavy  (Read 1064 times)

ShawnMiller

  • Playmaker Newbie
  • *
  • Posts: 4
    • ShawnMillerAnimator
Animation events appear to be heavy
« on: August 13, 2020, 08:10:19 AM »
Hi all, would be great to know if anyone has seen large spikes in their profiler when using animation events.

I appear to be getting them even if I set it to only trigger the events to empty states in the FSM.

Would be great if anyone has seen this and/or has a workaround. I'd love to keep using the events if possible.

Thankyou!!
Just a Unity Hobbiest https://twitter.com/thebeesneeze

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Animation events appear to be heavy
« Reply #1 on: August 14, 2020, 06:44:20 PM »
Hi.
Sorry i have not notice that yet.
But in our project we hardly use parameters.
we do use Animator Play a lot.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Animation events appear to be heavy
« Reply #2 on: August 16, 2020, 12:38:07 AM »
I assume you mean this type of animation event:
https://hutonggames.fogbugz.com/default.asp?W181

Can you confirm the method you’re calling on the target FSM?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Animation events appear to be heavy
« Reply #3 on: August 16, 2020, 04:06:00 AM »
Hi.
I misunderstood the question,
I actually not noticed the spikes yet, but i did notice some delay when i used Send Event.
Instead i am using 'Set State' but i definitely need to look now if its also gives spikes and maybe better make a script to handle sending events.

As i assume it is slower due to mirroring?

ShawnMiller

  • Playmaker Newbie
  • *
  • Posts: 4
    • ShawnMillerAnimator
Re: Animation events appear to be heavy
« Reply #4 on: August 16, 2020, 09:27:52 PM »
Hi all, thanks for the replies!

Yep, I'm using Send Event, and no, no mirroring, I generally avoid that :P

And yes Alex thats the type I'm sending to trigger the FSM event, I set them here though, but I asume they are the same.

https://docs.unity3d.com/540/Documentation/Manual/AnimationEventsOnImportedClips.html

thanks.
Just a Unity Hobbiest https://twitter.com/thebeesneeze

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Animation events appear to be heavy
« Reply #5 on: August 17, 2020, 06:09:55 AM »
Hi.
I think The Animator Event itself is Mirroring to expose the selections.

Maybe you can try Set State instead.
As string set the state name that you want to activate (instead of the Event)

ShawnMiller

  • Playmaker Newbie
  • *
  • Posts: 4
    • ShawnMillerAnimator
Re: Animation events appear to be heavy
« Reply #6 on: August 17, 2020, 06:18:37 AM »
Ah, i see, yeh I'll give it a shot and let you know. Thanks!!
Just a Unity Hobbiest https://twitter.com/thebeesneeze