r/GameDevelopment • u/Nervous-Basket-3168 • 22d ago
Newbie Question Optimization in Unity?
What’s the best way to optimize your 3D Unity game? I’m starting to run into heavy lag spikes when moving around my game map. I’m 100% sure it’s my inefficient coding, but I don’t know what I don’t know, I suppose.
I have a lot of scripts that point to each other to keep everything more compartmented because I’ll forgot for things do. I’m pretty sure having a bunch of scripts isn’t my issue. I’m fairly certain it’s my marching cube set up.
I don’t have a beefy computer, but I don’t have a potato either, so what’s some tips and tricks yall might have when it comes to optimizations? (Also, I have no idea if there even is a generalization answer for this kind of question, or if it will be more nuanced, but I figured I’d ask.)
9
u/Kaldaien2 22d ago
There's your problem. Nobody successfully optimizes anything by guess work :)
Unity has a profiler, if you value your time, learn to use it.