Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bbbscarter on July 29, 2015, 11:53:45 AM

Title: How to disable error pause?
Post by: bbbscarter on July 29, 2015, 11:53:45 AM
Hi! Since moving to Unity 5 I periodically get an error in my game which, on researching, looks like a benign, minor bug in Unity, which I would normally ignore.

The problem is, whenever this error is thrown Playmaker pauses the game in the editor. Unity's 'pause on error' is not selected, and I've disabled as many Playmaker error options as I can find, but to no avail.

Is there a way to stop Playmaker from pausing the game in the editor when an error is thrown?

Thanks!

Simon
Title: Re: How to disable error pause?
Post by: KoneJone on June 03, 2016, 11:06:57 AM
Bumping this up: is there a way to prevent the game from pausing in the Editor when bumping into an error?

I'm basically using the LoadLevel action to load a level, and would like to continue the flow - if the load fails - into another LoadLevel with the level number added by one. (Only during development, though: I'm adding numbered levels pretty much as I go, and sometimes a level is missing in between, and would like to then load the "next" available level.)
Title: Re: How to disable error pause?
Post by: Alex Chouls on June 03, 2016, 12:37:22 PM
Actually this is Unity throwing the error because the level can't be loaded, not sure why it doesn't respect the Error Pause setting. I've modified the Load Level actions to include a check so you can send a Failed Event if the level can't be loaded. This should avoid the Unity error and allow you to handle the situation (e.g., by trying to load another level)

I've attached the modified actions. Please let me know how they work for you...

 
Title: Re: How to disable error pause?
Post by: KoneJone on June 03, 2016, 02:43:58 PM
The updated actions work perfectly. Thank you very much, Alex!
Title: Re: How to disable error pause?
Post by: KoneJone on June 04, 2016, 03:51:07 AM
With further testing, I think the new LoadLevel is a tiny bit slower (like a fraction of  a second) than the old one. It's not a problem in my game, and it might just be my imagination, but I though you should know if you plan up update the official LoadLevel action with this one. :)

EDIT: I mean even when the scene to load is found with the first try, i.e. time is not spent on searching.
Title: Re: How to disable error pause?
Post by: Alex Chouls on June 04, 2016, 11:11:12 AM
Thanks for letting me know. I'll do some perf tests. I might make the level test a separate action.