Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ShawnMiller on August 13, 2020, 08:10:19 AM

Title: Animation events appear to be heavy
Post by: ShawnMiller 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!!
Title: Re: Animation events appear to be heavy
Post by: djaydino 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.
Title: Re: Animation events appear to be heavy
Post by: Alex Chouls 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?
Title: Re: Animation events appear to be heavy
Post by: djaydino 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?
Title: Re: Animation events appear to be heavy
Post by: ShawnMiller 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 (https://docs.unity3d.com/540/Documentation/Manual/AnimationEventsOnImportedClips.html)

thanks.
Title: Re: Animation events appear to be heavy
Post by: djaydino 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)
Title: Re: Animation events appear to be heavy
Post by: ShawnMiller on August 17, 2020, 06:18:37 AM
Ah, i see, yeh I'll give it a shot and let you know. Thanks!!