Process things at build to increase game speed

Hello,

Is it possible to process stuff at build and save it?

Like processing data that depends on the terrain.
Then, save it. Then, you can load it directly when the game runs so you don’t have to compute it.

Thanks :slight_smile:

Just do optimisations at editor time and save them.

Alternatively (this results in slower build times in editor and standalone):

Look at Unity - Scripting API: Build.IProcessScene.OnProcessScene - when unity makes a standalone or when you hit play, it copies the scene and you can use this to hook in and optimise things, delete things, be a destructive barbarian as it’s happening on the built copy.

So here I merge geo, change components from artist friendly ones to more data-friendly ones etc… whatever is necessary.

3 Likes

Excellent ! Thank you :slight_smile: