playMaker

Author Topic: [SOLVED] Question about application ready-state.  (Read 1817 times)

ShawnMcCool

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
[SOLVED] Question about application ready-state.
« on: February 11, 2012, 02:48:16 PM »
I have a game manager that reads in the necessary configuration for a level and tells an object to start populating the map once the map is loaded and ready.

However, even though I'm using 'FINISHED' the populator object isn't yet in the correct 'Listener' state when the game manager sends the signal.

What is a proper way to handle this?  If I put a WAIT delay on the game manager before it sends the "GO AHEAD AND POPULATE" event it works great.  But, I want to not waste time and do it as soon as it's ready.
« Last Edit: February 15, 2012, 01:11:53 PM by ShawnMcCool »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3493
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Question about application ready-state.
« Reply #1 on: February 12, 2012, 11:36:20 AM »
Are you talking about the Finished event in Load Level?

ShawnMcCool

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Question about application ready-state.
« Reply #2 on: February 12, 2012, 01:41:18 PM »
I have a few different "managers" that need to be at a ready state before the rest of the game kicks off.  What's the best way to manage that?

justifun

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 228
    • View Profile
Re: Question about application ready-state.
« Reply #3 on: February 13, 2012, 01:31:57 PM »
I believe what you want to do is have a seperate level (a preloader as you will).  And put all of your managers in there and let them get setup etc, and then use a "Load Level" action which takes you to the actual game as its finished event.

Correct me if i'm wrong alex, but the load level won't "finish" unless all of the assets in that level are loaded correct? so it shouldn't matter on which manager the action is added?

ShawnMcCool

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Question about application ready-state.
« Reply #4 on: February 15, 2012, 11:47:12 AM »
That sounds reasonable and it has given me some perspective.  The objects will persist through the scene change, though?  If so, which objects will and which won't? 

justifun

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 228
    • View Profile
Re: Question about application ready-state.
« Reply #5 on: February 15, 2012, 11:53:42 AM »
I forget off the top of my head what action has this checkbox, but basically you need to flag which objects don't get destroyed on load

more info here

http://unity3d.com/support/documentation/ScriptReference/Object.DontDestroyOnLoad.html

ill keep looking for the playmaker action that has this.....

justifun

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 228
    • View Profile
Re: Question about application ready-state.
« Reply #6 on: February 15, 2012, 11:54:54 AM »

ShawnMcCool

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Question about application ready-state.
« Reply #7 on: February 15, 2012, 01:09:42 PM »
Thank you, I now have a far better picture of the workflow I need to implement.