During my gameplay, when some object displays for the first time (some different graphics bullet for example), game slows down for a moment. Next time that object is shown, game continue smooth. I think this happens because texture is load during gameplay for the first time.
Please some advice how to resolve this.
You could pool your objects. There’s a good pool manager on the asset store, think I’m gonna buy it for my game
nah. i am using pulling. objects exist, but are inactive. when i activate them and when their textures display for first time, game blocks for moment. next time when their texture displays everything goes smooth.
So show them beforehand when the game loads.
hm, that would be ugly
it’s how people have overcome the issue beforehand
they just put all the textures on things in front of the camera when the level loads behind a loading screen(no occlusion culling), then hide it all
oh, ok, i got it. tnx for help
nah, i am having trouble with this texture preloading.
this is 2d game with unlit textures and unlit transparent textures on planes.
it don’t work if i put some big plane over screen infront of preloading elements, and it don’t work if i do GUI.DrawTexture.
pls some more help.