Playmaker Forum
PlayMaker Help & Tips => Android Help => Topic started by: TIGGYsmalls on September 30, 2013, 08:30:04 AM
-
I asked this on the Unity forums as I thought it was more of an engine thing but I'll ask here too.
When I create an object my game will skip a few frames so I was told to hide the object and use it when I need it. But what should I do if I need 10 of the same object? Just have 10 of them loaded from the start? Is there an action I've missed that would help me?
-
Ok, I got told, if want 10 of the objects in the scene, all 10 should be there from the start.
Is this the best way of doing it?
-
This is generally called object pooling, where you re-use objects from a pool of pre-created objects instead of creating new objects while the game is running.
Here are some pooling systems compatible with Playmaker:
http://hutonggames.com/playmakerforum/index.php?topic=4608.msg21650#msg21650
Or you could roll your own in Playmaker...
-
What Actions would I need to use if I was using playmaker?
Or do you mean keep the items off screen till I want them?
I'll get something working with them all loaded from the start and see how the phone handles it.
Thanks for the information.
-
Hi,
You can use something like pool manager plugins. I wrote some actions to go with this.
https://hutonggames.fogbugz.com/?W839
bye,
Jean
-
Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtCheckIfPrefabPoolExists.cs(36,25): error CS0246: The type or namespace name `SpawnPool' could not be found. Are you missing a using directive or an assembly reference?
I understand this means the script is in the wrong location but I'm not sure what goes where?
-
Hi,
Can you redownload the package? I think I had not updated to the latest pool manager ( 5)
https://hutonggames.fogbugz.com/default.asp?W839
bye,
Jean
-
One or two hiccups with my FSMs but apart from that it works perfectly. Thank you.