|
Post by christoph on Apr 22, 2021 18:46:36 GMT
I have some very heavy loading times on mobile. On iOS it can take up to 7 seconds on a iPhone 7 or SE, while on Android it takes up to 30 seconds on slower devices. Seems the more prefabs I pool the longer the loading time for my initial scene.
I asked this in another thread, but I think there is no way of loading only the prefabs that are needed for the current level and then behind the scenes load the rest. Right?
What can I do to reduce the loading time?
Any help is appreciated.
|
|
|
Post by DarkTonic Dev on Apr 22, 2021 20:39:11 GMT
You can use the Pool Mini-Boss for prefabs just for the current level, or part of a level. Check here for more info: www.dtdevtools.com/docs/coregamekit/PoolMiniBoss.htmBut there's no "behind the scenes" anything. This lets you split it up. I recommend a "tips" screen while loading so the user has something to read.
|
|
|
Post by christoph on Apr 22, 2021 21:23:58 GMT
|
|
|
Post by DarkTonic Dev on Apr 22, 2021 21:41:09 GMT
Yes you can call CreateNewPoolItem, although using Resource files or Addressables probably won't work with what Playmaker gives you.
Core GameKit does have upgrade pricing for Pool Boss users, although you will need to start over and create your Pool Boss setup again.
-B
|
|
|
Post by christoph on Apr 22, 2021 22:49:28 GMT
So you are saying that for prefabs not being loaded at the opening of the game (which I guess is before the first scene is loaded), I would need to put those in the Resource folder and do an Asset Bundle or Addressables?
I'm completely new to this and don't really get what would be the best approach in order to load lots of prefabs with Pool Boss and would appreciate if you could point me towards it. Right now I'm having all prefabs inside the Asset folder and am just loading them at Start all together with PoolBoss. Which I understand adds them immediately to the pool hence they are referenced from the beginning and therefore loaded at game open?
|
|
|
Post by DarkTonic Dev on Apr 23, 2021 3:14:13 GMT
I don't think you're going to be able to call CreateNewPoolItem with Playmaker anyway. That's meant for normal scripts.
No, for anything in Pool Boss, you can use normal prefab, Addressables or Resource files. Those are all options.
Pool Mini-Boss saves you from having to load all the prefabs from ALL levels at once. Just put in a Pool Mini-Boss with the items for 1 level. Then you load less at any one time.
|
|
|
Post by christoph on Apr 23, 2021 21:35:39 GMT
So when I put the prefabs into the resources folder, should I use Resources.LoadAll(“folderNameInsideResources”) or I just initialize Pool Boss and they get instantiated?
|
|
|
Post by DarkTonic Dev on Apr 24, 2021 1:06:05 GMT
Pool Boss does that for you. You don't need to write any code. You must make sure and set the "Prefab Source" field to "Resource file" when you create the Pool Item. It won't automatically know that it's a Resource.
|
|
|
Post by christoph on Apr 24, 2021 5:24:32 GMT
Thanks for your reply. Where is that "Prefab Source" field? I can't find it anywhere unfortunately. Thanks.
|
|
|
Post by christoph on Apr 24, 2021 15:26:31 GMT
Oh, you meant in code. I see though that Resource File is not a third option? 
|
|
|
Post by DarkTonic Dev on Apr 24, 2021 16:03:48 GMT
Sorry, I just checked and you're right. There is no Resource File option. Only Addressables. The field will appear if you install the Addressables package and enable Pool Boss Addressables support with the checkbox on the Welcome Window. Then you need to make your own Addressables packages, for which there's a lot of info online.
If you don't want to do that, just use prefabs as you are doing now.
Anyway, the answer is to not load all prefabs for the entire game into Pool Boss, but use Pool Mini-Boss for each level's prefabs.
|
|
|
Post by christoph on Apr 25, 2021 0:05:06 GMT
Can a prefab be in PoolBoss and not be instantiated on Start? Because seems when I put it to zero it won't spawn (doesn't allow to instantiate more). Is there a method for it that is the opposite to PoolBoss.DestroyPoolItem? PoolBoss.InstantiatePoolItem maybe?
|
|
|
Post by DarkTonic Dev on Apr 25, 2021 3:54:28 GMT
No. Well you can tell it to fill the pool over a number of frames instead of one, which I'm sure you know. If you set it to zero, it will be unusable.
Pool Mini-Boss is the way to go. It can be either a whole level of Prefabs, or something even smaller (a wave of enemies) if you like. You can break it up as small as you like.
|
|
|
Post by christoph on Apr 25, 2021 21:42:36 GMT
I guess I don't get around do I? How can I get the discount on the Asset Store directly? If that is possible anyways. If not to take advantage of the ongoing discount.
|
|
|
Post by DarkTonic Dev on Apr 25, 2021 23:34:16 GMT
I'm not sure which discount you're talking about? You can PM us or email at support@darktonic.com
-Brian
|
|