I know I have a lot of objects but does anyone know how I can reduce the lag?
Oh, probably the fact that everything’s checking for collisions at once
I’d make a UI object that looks like a loading screen, and once everything’s spawned it disappears.
Also u can use raycasts.
When are they checking for collisions?
And how would raycasting help?
Also, the lag is more for when I try to edit after testing. It crashes every time.
Sorry, I’m really dumb.
You can use the Performance metrics to understand what’s affecting your game performance; here are two screenshots that I took while your game was running:
As you can see, at the beginning of the game when the game is generating the terrain - there is a lot of Spawns, Proximity, and Destroyers in use.
And then when the game starts, it’s the proximity that it’s affecting the performance.
Try to turn off logic (such as stopping the proximity checks once the generating is done) or delete objects that are no longer needed in the level.
You can also try to limit the amounts of objects you spawn at once. Btw is this system from TinkerSmith/Brickccentric, or did you do it by yourself?
Thanks a lot!
I did it by myself. Why?
Cuz the generation’s kinda dope
Thanks! (Except the lag is horrible)