Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: dshad44 on September 14, 2017, 02:56:44 PM

Title: Music starts right away, but game starts 5 seconds later[SOLVED]
Post by: dshad44 on September 14, 2017, 02:56:44 PM
Hi guys and gals.

I've got an issue where my game suddenly started taking longer to start. I added all my objects to Pooly that I want to draw from. (I'm guessing it's loading all my Pooly objects in the beginning before it can take the first action of my game manager).

Is there a way to speed this up, or a way for me to start my music AFTER the loading is done? As it stands, the music plays for 3-5 seconds, throwing the entire opening of the game out of sync.

Any advice would be appreciated.
Thanks!
Title: Re: Music starts right away, but game starts 5 seconds later
Post by: HeathClose on September 14, 2017, 07:48:53 PM
is this in unity editor or on the device / desktop export?
Title: Re: Music starts right away, but game starts 5 seconds later
Post by: jeanfabre on September 15, 2017, 04:00:09 AM
Hi,

 you will need to profile your game to check what's going on.

 If indeed it's all your gameobjects that take time. Simply wait for them to load up and then synchronise the start of both the sounds and the menus or intro screen or game play.

 Bye,

 Jean
Title: Re: Music starts right away, but game starts 5 seconds later
Post by: dshad44 on September 15, 2017, 07:19:06 PM
This is in the Unity editor. I'll try making a build to see if it still happens.

And yes, I thought I would just change the music to start playing when the game itself starts to play with the first state from the game manager.

Thanks all!
Title: Re: Music starts right away, but game starts 5 seconds later
Post by: dshad44 on September 15, 2017, 09:38:15 PM
Seems like balancing the number of objects to Pool was the correct answer. Too many and the game chugs at start up, too few, and the objects don't respawn when needed.

Thanks all!