Skip to content

u/NeoTheShadow

In this archive from Jun 2023 to Oct 2026

0
posts
6
comments
0
media
22
score
1 saved before deletion

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.

If you don't know - use the Profiler.

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.

If you aren't sure - use the Profiler.

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.)

There is a generalized answer for this kind of question:

You need to figure out what component is bottlenecking your frametime, whether it's the CPU or GPU. The profiler can tell you at a glance how long each component took to process the frame.

As far as coding and CPU-bound tasks are concerned - the Profiler can tell you what gets called when and how long does it take. If you want to go a step further, Unity's Profile Analyzer can analyze data over multiple frames.

6 points

When people describe bit count when refereing to assets - they usually refer to bits per pixel.

Most modern games today use 24bits per pixel (8 bits per color channel, no alpha channel) in their textures. Some use 32bits per pixel (8 bits per each channel) if texture transparency is important.

Gameboy Color supports up to 15bits per pixel textures (5 bits per color channel, no alpha channel).

Skyrim mostly uses 24bit textures.

3 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.