PlayMaker Help & Tips > PlayMaker Help

gc.collect giving huge CPU spikes for PlaymakerFSM.OnTriggerStay() [SOLVED]

(1/1)

pneill:
I have a scene with about 20 spawned objects using Pool Manager.  Each spawned object has a rigidbody.  The scene works great, except about every 30 seconds or so the GC.collect function associated to the PlaymakerFSM.OnTriggerStay() event hammers my scene and drives the frame rate to under 30 seconds.  Any clue what's happening here?  I'm using 1.3.2

jeanfabre:
Hi,

 I am not sure why it is so, but I never use OnTriggerStay, instead I rely on triggerEnter and triggerExit
I only use trigger stay when loading scenes or objects that "could" be already triggering ( because triggerEnter would not trigger properly), for your gameLoop, I would avoid this all together.

but of course if would be good to get to the bottom of this peaks.

 Bye,

 Jean

pneill:
Hi Jean, thanks for responding.

That's the curious part.  I don't use onTriggerStay anywhere in the FSM.  I do use onTriggerEnter, but never OnTriggerStay.  And remember this issue is a just a GC event associated with onTriggerStay.  I thought that perhaps PlayMaker was calling OnTriggerStay in the background?

Alex Chouls:
Are you seeing this in the editor or standalone builds? There is some logging going on in the editor that could cause gc calls. If you turn off logging (in the debug menu) does it help?

pneill:
It was in editor mode and turning off the debug logging in playmaker did the trick. 

Navigation

[0] Message Index

Go to full version