Darwin Build Environment Help Center

Tool is recompiling everything every time

append delete Andy

Windows 11
Builder 3.77
iOS 18.5

Hi PM,

Got it working with Unity 6000.2.8f1 no problem, even after transferring stuff to a new project. One question -- I'd like the builds to take less time by not compiling everything every time. There's 1000+ files being compiled, etc. My first build failed only because of the wrong bundle identifier in the settings, so I got a provisioning fail after everything was built. I put in the proper bundle identifier, and it rebuilt successfully, but seemed to compile everything again. In fact, all my builds seem to rebuild everything. Am I misreading the speed/logs of the rebuilds, or is there something I can change to fly through all the unchanged file compiles? When I do the Unity iOS build, I choose Append rather than Replace, but that maybe doesn't make a difference. Thanks!

Andy

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello Andy

If Unity touches the files’ modification times, they are recompiled.

Basically, for a source file not to be recompiled, the conditions are:

1. The corresponding object file must be younger than the source file, and

2. The corresponding object file must be younger than the Xcode project file in which this source file belongs.

If you are positively certain that your files haven’t changed, you can "undo" the damage caused by the Unity editor on the project files’ timestamps when you regenerate the Xcode project by scripting a pre-build step in your favorite scripting language that will align the timestamps (modification times) of those files so that the two conditions above become true.

Any good LLM should be able to help you do that.

Hope this helps :-)

append delete #2. Andy

Sounds good. Thanks as always for the speedy replies!

append delete #3. Pierre-Marie Baty

You’re welcome. Complementary info that I forgot to mention: in mixed-source projects, things are more complicated to assess, so the generation of the Swift/ObjC header happens in all cases, regardless of timestamps. As well as the generation of Swift modules. The former might take some time. The latter is usually fast.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty