playMaker

Author Topic: Playmaker Load Level Issues  (Read 3927 times)

silonighora

  • Playmaker Newbie
  • *
  • Posts: 28
Playmaker Load Level Issues
« on: February 01, 2016, 01:24:10 PM »
Hi,
I am trying to use the playmaker load level functionality. For this I have created 2 exactly similar scenes. I have added the scenes to the build settings as well(0 and 1). In the first scene, I have one simple Game Object called level manager and to that GO I added one FSM where I am calling the Load Level (Scene-1). I have also set the Dont destroy on load to True. I dont have a level manager in Scene-1 as I want the level manager from scene-0 to persists in scene-1 as well.
Now, when I play my game, I get lot of Playamaker errors. But if I directly load scene-1 from Unity I dont get any of this error.

Can you please let me know what I might be doing wrong?

Error Loading Action: State 7 : HutongGames.PlayMaker.Actions.GetRandomObject : storeResult
System.NullReferenceException: Object reference not set to an instance of an object
  at HutongGames.PlayMaker.ActionData.GetFsmGameObject (Int32 paramIndex) [0x00021] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1631



Regards,
Siloni

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Playmaker Load Level Issues
« Reply #1 on: February 01, 2016, 02:37:27 PM »
Couldn't reproduce the error here...
What versions of Unity and Playmaker are you using?

« Last Edit: February 01, 2016, 02:42:57 PM by Alex Chouls »

silonighora

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Playmaker Load Level Issues
« Reply #2 on: February 01, 2016, 10:06:58 PM »
Hi Alex,
I am using Unity 5.3.1 and Playmaker 1.8

Regards,
Siloni

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Playmaker Load Level Issues
« Reply #3 on: February 01, 2016, 10:38:05 PM »
Are you using the latest version of 1.8? Beta 41?

I've tried reproducing the setup you described and I'm not getting any errors.
Are there more repro steps?

Are you able to share the project? If you can PM a download link.

silonighora

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Playmaker Load Level Issues
« Reply #4 on: February 01, 2016, 11:17:03 PM »
In the first level I have added a wait of 3 secs before the next level is loaded. Now this seems to be working fine. I have scripts to instantiate prefabs. So, looks like there are incompatibilities between those scripts. I can live with this wait. So for now, I am good.

Thanks Alex for looking into this. Will let you know if I face this issue again.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Playmaker Load Level Issues
« Reply #5 on: February 02, 2016, 12:55:35 AM »
You could try waiting a single frame using a Next Frame Event instead of 3 seconds. It could be that you just need to wait until all scripts have had a chance to update...