iOS Build Environment Help Center

Unity 2023 Include path issue

append delete Mike Hein

Windows 10 Latest
Builder 3.54
SDK 16.2
Log: https://drive.google.com/file/d/12BxbVoGu5ac2MIfaHOxoZbYf5TRvSdWI/view?usp=sharing

Hi since my project will not build with Unity 2022 I decided to try it with Uniyt 2023 beta (2023.1.0b3). It seems that when running clang++.exe all the include paths are broken (see build log). Just to see, I tried going through and manually changing the files in my build files to include absolute paths to these files and this seems to fix things - though I did not change all references so I don't know if there will be further problems after the references are all fixed.

Question: Is there something I can change in the build.cmd file or elsewhere to address these include path issues?

Thanks,
-Mike

Reply RSS

Replies

append delete #1. Mike Hein

BTW - I wanted to add one more detail. My project continues to build fine with the same iOS Builder setup when using Unity 2021.3.18f1. I will just continue using this if needed - I've just been excited to upgrade Unity versions due to some of the assembly reload/compilation time improvements in the new versions.

Best,
-Mike

append delete #2. Pierre-Marie Baty

Hello Mike

At first sight it looks like Unity generates a bogus project, but I could be mistaken. The command-line flags that are passed to il2cpp.exe (the Unity il2cpp compiler) are taken from the project file itself. Do you have the possibility to check whether this project build correctly with Xcode ?

append delete #3. Mike Hein

I was able to get the project to build in xcode, but I had to do three things:

-Correct about 8 include references that where incorrectly referenced
-Add Mapkit.Framework to the UnityFramework Link Binary With Libararies list
-Update the Unity-iPhone Info to include a Privacy Health Kit description (for some reason it failed to come over from the info.plist)

So yes it builds in xCode but it took a bit of troubleshoot and tweaking to the build that Unity gave me.

Thanks for your reply,
-Mike

append delete #4. Pierre-Marie Baty

Well, then that gives you a good hint. You'll probably be able to build it in Windows if you replicate the same include path changes to the source files and fix the privacy info in the Info.plist. To add MapKit just use the "add extra framework" button.

But IMO, it's probably wiser to "fix" your Unity project instead so that it generates Xcode projects that are free of these errors in the first place.

Good luck,

append delete #5. Mike Hein

Okay, thanks for pointing in the right direction.

append delete #6. Pierre-Marie Baty

You’re welcome. Happy building !

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