google-ar / arcore-unity-extensions

Google ARCore Extensions and Geospatial Creator for Unity's AR Foundation
Other
353 stars 96 forks source link

Wrong define in assembly definition file #190

Open YisharPixelsHub opened 6 months ago

YisharPixelsHub commented 6 months ago

The assembly definition file has the wrong value for the Version Defines field. image

As you can see in the screenshot both versions of ARFoundation use the same flag, but the version [5.0,6.0) should use ARCORE_USE_ARF_5. This is overriden with the ARCORE_USE_ARF_5 in PlayerSettings when building an app, but not in editor or when building AssetBundles, leading to an error because editor and platform builds have different serialized fields on the ARCoreExtensions script.

As a workaround, the .asmdef of the package can be edited in a text editor and the value can be changed to the correct oneARCORE_USE_ARF_5, and unity will apply it after that.

Jocke155 commented 6 months ago

Do you know if this causes any issues when building?

YisharPixelsHub commented 6 months ago

It causes issues when building AssetBundles. It does not when building the app IF the user already applied the ARCORE_USE_ARF_5 in PlayerSettings > Other Settings > Scripting Define Symbols, as it has higher priority in the #IF chain on ARCoreExtensions.cs (and maybe more scripts).