Search Unity

Exporting app 64 bits IL2CPP FAILS

Discussion in 'Editor & General Support' started by dcardona33, Oct 15, 2019.

  1. dcardona33

    dcardona33

    Joined:
    Oct 15, 2019
    Posts:
    3
    Hello

    I'm trying to export my Unity project to Android as 64 bits using IL2CPP but i get this error. I've tried to export it with and without ARMv7 and x86 but still getting the same error. I would appreciate some help (I'm using Unity 2017.4.33f1 LTS).

    Failed running /Volumes/Environment/2019/2017.4.33f1/Unity.app/Contents/il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="net45" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Volumes/Unity/APP_AR_MOVIL/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/android-ndk-r13b" --map-file-parser="/Volumes/Environment/2019/2017.4.33f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --assembly="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp.dll" --assembly="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.UI.dll" --assembly="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Analytics.dll" --assembly="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.dll" --generatedcppdir="/Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain.
    Output directory: /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a
    Cache directory: /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache
    ObjectFiles: 565 of which compiled: 0
    Total compilation time: 1163 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/android-ndk-r13b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/1f/b6fzjg314tl7xfx_f7j_6lpr0000gp/T/tmp188c5e63.tmp" -o "/Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_B116FC880D9FDAE04E8A08DF9D202038/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/android-ndk-r13b/platforms/android-16/arch-arm" -gcc-toolchain "/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "/Volumes/Environment/2019/2017.4.33f1/PlaybackEngines/AndroidPlayer/android-ndk-r13b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="/Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_B116FC880D9FDAE04E8A08DF9D202038/libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd

    clang++: warning: argument unused during compilation: '-pie'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwRegisterLogCallback_m3654812582':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33450: undefined reference to `arwRegisterLogCallback'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetLogLevel_m4083758581':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33460: undefined reference to `arwSetLogLevel'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwInitialiseAR_m2929190135':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33470: undefined reference to `arwInitialiseAR'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwInitialiseARWithOptions_m625694913':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33481: undefined reference to `arwInitialiseARWithOptions'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetARToolKitVersion_m3201963916':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33496: undefined reference to `arwGetARToolKitVersion'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetError_m4283749570':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33514: undefined reference to `arwGetError'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwShutdownAR_m2424926485':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33525: undefined reference to `arwShutdownAR'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwStartRunningB_m1354323359':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33547: undefined reference to `arwStartRunningB'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwStartRunningStereoB_m837025377':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33591: undefined reference to `arwStartRunningStereoB'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwIsRunning_m670035622':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33610: undefined reference to `arwIsRunning'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwStopRunning_m2674007658':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33621: undefined reference to `arwStopRunning'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetProjectionMatrix_m3881505666':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33641: undefined reference to `arwGetProjectionMatrix'
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33641: undefined reference to `arwGetProjectionMatrix'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetProjectionMatrixStereo_m577899129':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33684: undefined reference to `arwGetProjectionMatrixStereo'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetVideoParams_m2681739700':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33736: undefined reference to `arwGetVideoParams'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetVideoParamsStereo_m3457343575':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33789: undefined reference to `arwGetVideoParamsStereo'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwCapture_m1262292085':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33832: undefined reference to `arwCapture'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwUpdateAR_m2798135840':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33843: undefined reference to `arwUpdateAR'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwUpdateTexture32_m2258550673':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33854: undefined reference to `arwUpdateTexture32'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwUpdateTexture32Stereo_m3529717512':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33865: undefined reference to `arwUpdateTexture32Stereo'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableAppearanceCount_m1456757297':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33876: undefined reference to `arwGetTrackableAppearanceCount'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableAppearanceConfig_m1469711207':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33908: undefined reference to `arwGetTrackableAppearanceConfig'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableAppearanceImage_m3405901054':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33945: undefined reference to `arwGetTrackableAppearanceImage'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableOptionBool_m1575949222':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33956: undefined reference to `arwGetTrackableOptionBool'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackableOptionBool_m3400990247':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33967: undefined reference to `arwSetTrackableOptionBool'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableOptionInt_m4166437821':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33977: undefined reference to `arwGetTrackableOptionInt'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackableOptionInt_m2357014458':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33988: undefined reference to `arwSetTrackableOptionInt'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackableOptionFloat_m2343024866':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:33998: undefined reference to `arwGetTrackableOptionFloat'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackableOptionFloat_m265254609':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34009: undefined reference to `arwSetTrackableOptionFloat'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackerOptionBool_m3972683749':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34019: undefined reference to `arwGetTrackerOptionBool'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackerOptionBool_m1723349582':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34030: undefined reference to `arwSetTrackerOptionBool'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackerOptionInt_m2655277469':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34040: undefined reference to `arwGetTrackerOptionInt'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackerOptionInt_m1773570273':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34051: undefined reference to `arwSetTrackerOptionInt'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwGetTrackerOptionFloat_m3360765461':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34061: undefined reference to `arwGetTrackerOptionFloat'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwSetTrackerOptionFloat_m1908550247':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34072: undefined reference to `arwSetTrackerOptionFloat'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwAddMarker_m3832349153':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34086: undefined reference to `arwAddMarker'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwRemoveMarker_m4236466334':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34101: undefined reference to `arwRemoveMarker'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwRemoveAllMarkers_m3117551142':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34112: undefined reference to `arwRemoveAllMarkers'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwQueryMarkerVisibility_m2040263729':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34123: undefined reference to `arwQueryMarkerVisibility'
    /Volumes/Unity/APP_AR_MOVIL/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/CD81F96FB5615D292D3DA69E8A35B5EC.o: In function `ARNativePluginStatic_arwQueryMarkerTransformation_m1797638104':
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34143: undefined reference to `arwQueryMarkerTransformation'
    /Volumes/Unity/APP_AR_MOVIL/Temp/StagingArea/Il2Cpp/il2cppOutput/Bulk_Assembly-CSharp_0.cpp:34143: undefined reference to `arwQueryMarkerTransformation'
    /Volumes/Unity/APP_AR_MOVIL/Libra<message truncated>

    And:

    Code (CSharp):
    1. Exception: /Volumes/Environment/2019/2017.4.33f1/Unity.app/Contents/il2cpp/build/il2cpp.exe did not run properly!
    2. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    3. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    4. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    5. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.Collections.Generic.ICollection`1[T] userAssemblies, System.String outputDirectory, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    6. UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    7. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, System.Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    8. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <20bbeec04248478d8edde45ce5a4f675>:0)
    9. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <20bbeec04248478d8edde45ce5a4f675>:0)
    10. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at <20bbeec04248478d8edde45ce5a4f675>:0)
    11. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <20bbeec04248478d8edde45ce5a4f675>:0)
    12. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
    13. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    14.  
     
    Last edited: Oct 15, 2019
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    It looks like you have extern methods in C# (one of which is named arwRegisterLogCallback). Those methods must have a corresponding definition in a native library.

    If they should please make sure that native library is part of the build. If they should not compile for Android, please use #if statements in C# code to remove them. See https://docs.unity3d.com/Manual/PlatformDependentCompilation.html for details.
     
  3. dcardona33

    dcardona33

    Joined:
    Oct 15, 2019
    Posts:
    3
    I'm gonna check it and i'll let u know if it worked. Thank you for your answer.
     
  4. dcardona33

    dcardona33

    Joined:
    Oct 15, 2019
    Posts:
    3
    Hello

    After searching those functions, i realized that they correspond to the ARtoolkit library and im not sure how to proceed to fix them because i only imported it...but i saw some code refering to a native library that ARtoolkit uses but for some reason Unity does not include it while exporting . Any suggestion?. Sorry for my bad english and thank you.

    EDIT 1: Exporting my project in "Mono" Works.

    Code (CSharp):
    1. /*
    2. *  PluginFunctions.cs
    3. *  ARToolKit for Unity
    4. *
    5. *  This file is part of ARToolKit for Unity.
    6. *
    7. *  ARToolKit for Unity is free software: you can redistribute it and/or modify
    8. *  it under the terms of the GNU Lesser General Public License as published by
    9. *  the Free Software Foundation, either version 3 of the License, or
    10. *  (at your option) any later version.
    11. *
    12. *  ARToolKit for Unity is distributed in the hope that it will be useful,
    13. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    14. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15. *  GNU Lesser General Public License for more details.
    16. *
    17. *  You should have received a copy of the GNU Lesser General Public License
    18. *  along with ARToolKit for Unity.  If not, see <http://www.gnu.org/licenses/>.
    19. *
    20. *  As a special exception, the copyright holders of this library give you
    21. *  permission to link this library with independent modules to produce an
    22. *  executable, regardless of the license terms of these independent modules, and to
    23. *  copy and distribute the resulting executable under terms of your choice,
    24. *  provided that you also meet, for each linked independent module, the terms and
    25. *  conditions of the license of that module. An independent module is a module
    26. *  which is neither derived from nor based on this library. If you modify this
    27. *  library, you may extend this exception to your version of the library, but you
    28. *  are not obligated to do so. If you do not wish to do so, delete this exception
    29. *  statement from your version.
    30. *
    31. *  Copyright 2015-2016 Daqri, LLC.
    32. *  Copyright 2010-2015 ARToolworks, Inc.
    33. *
    34. *  Author(s): Philip Lamb, Julian Looser, Wally Young
    35. *
    36. */
    37.  
    38. using System;
    39. using System.Collections.Generic;
    40. using System.Linq;
    41. using System.Text;
    42. using System.Runtime.InteropServices;
    43. using UnityEngine;
    44.  
    45. public static class PluginFunctions
    46. {
    47.     [NonSerialized]
    48.     public static bool inited = false;
    49.  
    50.     // Delegate type declaration.
    51.     public delegate void LogCallback([MarshalAs(UnmanagedType.LPStr)] string msg);
    52.  
    53.     // Delegate instance.
    54.     private static LogCallback logCallback = null;
    55.     private static GCHandle logCallbackGCH;
    56.  
    57.     public static void arwRegisterLogCallback(LogCallback lcb)
    58.     {
    59.         logCallback = lcb;
    60.         if (lcb != null) {
    61.             logCallbackGCH = GCHandle.Alloc(logCallback); // Does not need to be pinned, see http://stackoverflow.com/a/19866119/316487
    62.         }
    63.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwRegisterLogCallback(logCallback);
    64.         else ARNativePlugin.arwRegisterLogCallback(logCallback);
    65.         if (lcb == null) {
    66.             logCallbackGCH.Free();
    67.         }
    68.     }
    69.  
    70.     public static void arwSetLogLevel(int logLevel)
    71.     {
    72.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetLogLevel(logLevel);
    73.         else ARNativePlugin.arwSetLogLevel(logLevel);
    74.     }
    75.  
    76.     public static bool arwInitialiseAR(int pattSize = 16, int pattCountMax = 25)
    77.     {
    78.         bool ok;
    79.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwInitialiseARWithOptions(pattSize, pattCountMax);
    80.         else ok = ARNativePlugin.arwInitialiseARWithOptions(pattSize, pattCountMax);
    81.         if (ok) PluginFunctions.inited = true;
    82.         return ok;
    83.     }
    84.  
    85.     public static string arwGetARToolKitVersion()
    86.     {
    87.         StringBuilder sb = new StringBuilder(128);
    88.         bool ok;
    89.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwGetARToolKitVersion(sb, sb.Capacity);
    90.         else ok = ARNativePlugin.arwGetARToolKitVersion(sb, sb.Capacity);
    91.         if (ok) return sb.ToString();
    92.         else return "unknown";
    93.     }
    94.  
    95.     public static int arwGetError()
    96.     {
    97.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetError();
    98.         else return ARNativePlugin.arwGetError();
    99.     }
    100.  
    101.     public static bool arwShutdownAR()
    102.     {
    103.         bool ok;
    104.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwShutdownAR();
    105.         else ok = ARNativePlugin.arwShutdownAR();
    106.         if (ok) PluginFunctions.inited = false;
    107.         return ok;
    108.     }
    109.  
    110.     public static bool arwStartRunningB(string vconf, byte[] cparaBuff, int cparaBuffLen, float nearPlane, float farPlane)
    111.     {
    112.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwStartRunningB(vconf, cparaBuff, cparaBuffLen, nearPlane, farPlane);
    113.         else return ARNativePlugin.arwStartRunningB(vconf, cparaBuff, cparaBuffLen, nearPlane, farPlane);
    114.     }
    115.  
    116.     public static bool arwStartRunningStereoB(string vconfL, byte[] cparaBuffL, int cparaBuffLenL, string vconfR, byte[] cparaBuffR, int cparaBuffLenR, byte[] transL2RBuff, int transL2RBuffLen, float nearPlane, float farPlane)
    117.     {
    118.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwStartRunningStereoB(vconfL, cparaBuffL, cparaBuffLenL, vconfR, cparaBuffR, cparaBuffLenR, transL2RBuff, transL2RBuffLen, nearPlane, farPlane);
    119.         else return ARNativePlugin.arwStartRunningStereoB(vconfL, cparaBuffL, cparaBuffLenL, vconfR, cparaBuffR, cparaBuffLenR, transL2RBuff, transL2RBuffLen, nearPlane, farPlane);
    120.     }
    121.  
    122.     public static bool arwIsRunning()
    123.     {
    124.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwIsRunning();
    125.         else return ARNativePlugin.arwIsRunning();
    126.     }
    127.  
    128.     public static bool arwStopRunning()
    129.     {
    130.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwStopRunning();
    131.         else return ARNativePlugin.arwStopRunning();
    132.     }
    133.  
    134.     public static bool arwGetProjectionMatrix(float[] matrix)
    135.     {
    136.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetProjectionMatrix(matrix);
    137.         else return ARNativePlugin.arwGetProjectionMatrix(matrix);
    138.     }
    139.  
    140.     public static bool arwGetProjectionMatrixStereo(float[] matrixL, float[] matrixR)
    141.     {
    142.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetProjectionMatrixStereo(matrixL, matrixR);
    143.         else return ARNativePlugin.arwGetProjectionMatrixStereo(matrixL, matrixR);
    144.     }
    145.  
    146.     public static bool arwGetVideoParams(out int width, out int height, out int pixelSize, out String pixelFormatString)
    147.     {
    148.         StringBuilder sb = new StringBuilder(128);
    149.         bool ok;
    150.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwGetVideoParams(out width, out height, out pixelSize, sb, sb.Capacity);
    151.         else ok = ARNativePlugin.arwGetVideoParams(out width, out height, out pixelSize, sb, sb.Capacity);
    152.         if (!ok) pixelFormatString = "";
    153.         else pixelFormatString = sb.ToString();
    154.         return ok;
    155.     }
    156.  
    157.     public static bool arwGetVideoParamsStereo(out int widthL, out int heightL, out int pixelSizeL, out String pixelFormatL, out int widthR, out int heightR, out int pixelSizeR, out String pixelFormatR)
    158.     {
    159.         StringBuilder sbL = new StringBuilder(128);
    160.         StringBuilder sbR = new StringBuilder(128);
    161.         bool ok;
    162.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwGetVideoParamsStereo(out widthL, out heightL, out pixelSizeL, sbL, sbL.Capacity, out widthR, out heightR, out pixelSizeR, sbR, sbR.Capacity);
    163.         else ok = ARNativePlugin.arwGetVideoParamsStereo(out widthL, out heightL, out pixelSizeL, sbL, sbL.Capacity, out widthR, out heightR, out pixelSizeR, sbR, sbR.Capacity);
    164.         if (!ok) {
    165.             pixelFormatL = "";
    166.             pixelFormatR = "";
    167.         } else {
    168.             pixelFormatL = sbL.ToString();
    169.             pixelFormatR = sbR.ToString();
    170.         }
    171.         return ok;
    172.     }
    173.  
    174.     public static bool arwCapture()
    175.     {
    176.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwCapture();
    177.         else return ARNativePlugin.arwCapture();
    178.     }
    179.  
    180.     public static bool arwUpdateAR()
    181.     {
    182.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwUpdateAR();
    183.         else return ARNativePlugin.arwUpdateAR();
    184.     }
    185.  
    186.     public static bool arwUpdateTexture32([In, Out]Color32[] colors32)
    187.     {
    188.         bool ok;
    189.         GCHandle handle = GCHandle.Alloc(colors32, GCHandleType.Pinned);
    190.         IntPtr address = handle.AddrOfPinnedObject();
    191.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwUpdateTexture32(address);
    192.         else ok = ARNativePlugin.arwUpdateTexture32(address);
    193.         handle.Free();
    194.         return ok;
    195.     }
    196.  
    197.     public static bool arwUpdateTexture32Stereo([In, Out]Color32[] colors32L, [In, Out]Color32[] colors32R)
    198.     {
    199.         bool ok;
    200.         GCHandle handle0 = GCHandle.Alloc(colors32L, GCHandleType.Pinned);
    201.         GCHandle handle1 = GCHandle.Alloc(colors32R, GCHandleType.Pinned);
    202.         IntPtr address0 = handle0.AddrOfPinnedObject();
    203.         IntPtr address1 = handle1.AddrOfPinnedObject();
    204.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwUpdateTexture32Stereo(address0, address1);
    205.         else ok = ARNativePlugin.arwUpdateTexture32Stereo(address0, address1);
    206.         handle0.Free();
    207.         handle1.Free();
    208.         return ok;
    209.     }
    210.  
    211.     public static int arwGetTrackableAppearanceCount(int markerID)
    212.     {
    213.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackableAppearanceCount(markerID);
    214.         else return ARNativePlugin.arwGetTrackableAppearanceCount(markerID);
    215.     }
    216.  
    217.     public static bool arwGetTrackableAppearanceConfig(int markerID, int patternID, float[] matrix, out float width, out float height, out int imageSizeX, out int imageSizeY)
    218.     {
    219.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackableAppearanceConfig(markerID, patternID, matrix, out width, out height, out imageSizeX, out imageSizeY);
    220.         else return ARNativePlugin.arwGetTrackableAppearanceConfig(markerID, patternID, matrix, out width, out height, out imageSizeX, out imageSizeY);
    221.     }
    222.  
    223.     public static bool arwGetTrackableAppearanceImage(int markerID, int patternID, [In, Out]Color32[] colors32)
    224.     {
    225.         bool ok;
    226.         GCHandle handle = GCHandle.Alloc(colors32, GCHandleType.Pinned);
    227.         IntPtr address = handle.AddrOfPinnedObject();
    228.         if (Application.platform == RuntimePlatform.IPhonePlayer) ok = ARNativePluginStatic.arwGetTrackableAppearanceImage(markerID, patternID, address);
    229.         else ok = ARNativePlugin.arwGetTrackableAppearanceImage(markerID, patternID, address);
    230.         handle.Free();
    231.         return ok;
    232.     }
    233.  
    234.     public static bool arwGetTrackableOptionBool(int markerID, int option)
    235.     {
    236.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackableOptionBool(markerID, option);
    237.         else return ARNativePlugin.arwGetTrackableOptionBool(markerID, option);
    238.     }
    239.  
    240.     public static void arwSetTrackableOptionBool(int markerID, int option, bool value)
    241.     {
    242.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackableOptionBool(markerID, option, value);
    243.         else ARNativePlugin.arwSetTrackableOptionBool(markerID, option, value);
    244.     }
    245.  
    246.     public static int arwGetTrackableOptionInt(int markerID, int option)
    247.     {
    248.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackableOptionInt(markerID, option);
    249.         else return ARNativePlugin.arwGetTrackableOptionInt(markerID, option);
    250.     }
    251.  
    252.     public static void arwSetTrackableOptionInt(int markerID, int option, int value)
    253.     {
    254.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackableOptionInt(markerID, option, value);
    255.         else ARNativePlugin.arwSetTrackableOptionInt(markerID, option, value);
    256.     }
    257.  
    258.     public static float arwGetTrackableOptionFloat(int markerID, int option)
    259.     {
    260.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackableOptionFloat(markerID, option);
    261.         else return ARNativePlugin.arwGetTrackableOptionFloat(markerID, option);
    262.     }
    263.  
    264.     public static void arwSetTrackableOptionFloat(int markerID, int option, float value)
    265.     {
    266.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackableOptionFloat(markerID, option, value);
    267.         else ARNativePlugin.arwSetTrackableOptionFloat(markerID, option, value);
    268.     }
    269.  
    270.     //
    271.     // Constants for use with tracker option setters/getters.
    272.     //
    273.     public enum ARW_TRACKER_OPTION {
    274.         ARW_TRACKER_OPTION_2D_MAX_IMAGES = 0,                          ///< int.
    275.         ARW_TRACKER_OPTION_SQUARE_THRESHOLD = 1,                       ///< Threshold value used for image binarization. int in range [0-255].
    276.         ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE = 2,                  ///< Threshold mode used for image binarization. int.
    277.         ARW_TRACKER_OPTION_SQUARE_LABELING_MODE = 3,                   ///< int.
    278.         ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE = 4,          ///< int.
    279.         ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE = 5,                     ///< float in range (0-0.5).
    280.         ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE = 6,                ///< int.
    281.         ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE = 7,                 ///< int.
    282.         ARW_TRACKER_OPTION_SQUARE_DEBUG_MODE = 8,                      ///< Enables or disable state of debug mode in the tracker. When enabled, a black and white debug image is generated during marker detection. The debug image is useful for visualising the binarization process and choosing a threshold value. bool.
    283.     };
    284.  
    285.     public static bool arwGetTrackerOptionBool(int option)
    286.     {
    287.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackerOptionBool(option);
    288.         else return ARNativePlugin.arwGetTrackerOptionBool(option);
    289.     }
    290.  
    291.     public static void arwSetTrackerOptionBool(int option, bool value)
    292.     {
    293.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackerOptionBool(option, value);
    294.         else ARNativePlugin.arwSetTrackerOptionBool(option, value);
    295.     }
    296.  
    297.     public static int arwGetTrackerOptionInt(int option)
    298.     {
    299.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackerOptionInt(option);
    300.         else return ARNativePlugin.arwGetTrackerOptionInt(option);
    301.     }
    302.  
    303.     public static void arwSetTrackerOptionInt(int option, int value)
    304.     {
    305.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackerOptionInt(option, value);
    306.         else ARNativePlugin.arwSetTrackerOptionInt(option, value);
    307.     }
    308.  
    309.     public static float arwGetTrackerOptionFloat(int option)
    310.     {
    311.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwGetTrackerOptionFloat(option);
    312.         else return ARNativePlugin.arwGetTrackerOptionFloat(option);
    313.     }
    314.  
    315.     public static void arwSetTrackerOptionFloat(int option, float value)
    316.     {
    317.         if (Application.platform == RuntimePlatform.IPhonePlayer) ARNativePluginStatic.arwSetTrackerOptionFloat(option, value);
    318.         else ARNativePlugin.arwSetTrackerOptionFloat(option, value);
    319.     }
    320.  
    321.     public static int arwAddMarker(string cfg)
    322.     {
    323.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwAddMarker(cfg);
    324.         else return ARNativePlugin.arwAddMarker(cfg);
    325.     }
    326.  
    327.     public static bool arwRemoveMarker(int markerID)
    328.     {
    329.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwRemoveMarker(markerID);
    330.         else return ARNativePlugin.arwRemoveMarker(markerID);
    331.     }
    332.  
    333.     public static int arwRemoveAllMarkers()
    334.     {
    335.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwRemoveAllMarkers();
    336.         else return ARNativePlugin.arwRemoveAllMarkers();
    337.     }
    338.  
    339.  
    340.     public static bool arwQueryMarkerVisibility(int markerID)
    341.     {
    342.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwQueryMarkerVisibility(markerID);
    343.         else return ARNativePlugin.arwQueryMarkerVisibility(markerID);
    344.     }
    345.  
    346.     public static bool arwQueryMarkerTransformation(int markerID, float[] matrix)
    347.     {
    348.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwQueryMarkerTransformation(markerID, matrix);
    349.         else return ARNativePlugin.arwQueryMarkerTransformation(markerID, matrix);
    350.     }
    351.  
    352.     public static bool arwQueryMarkerTransformationStereo(int markerID, float[] matrixL, float[] matrixR)
    353.     {
    354.         if (Application.platform == RuntimePlatform.IPhonePlayer) return ARNativePluginStatic.arwQueryMarkerTransformationStereo(markerID, matrixL, matrixR);
    355.         else return ARNativePlugin.arwQueryMarkerTransformationStereo(markerID, matrixL, matrixR);
    356.     }
    357.  
    358. }
    359.  
    Code (CSharp):
    1. /*
    2. *  ARNativePlugin.cs
    3. *  ARToolKit for Unity
    4. *
    5. *  This file is part of ARToolKit for Unity.
    6. *
    7. *  ARToolKit for Unity is free software: you can redistribute it and/or modify
    8. *  it under the terms of the GNU Lesser General Public License as published by
    9. *  the Free Software Foundation, either version 3 of the License, or
    10. *  (at your option) any later version.
    11. *
    12. *  ARToolKit for Unity is distributed in the hope that it will be useful,
    13. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    14. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15. *  GNU Lesser General Public License for more details.
    16. *
    17. *  You should have received a copy of the GNU Lesser General Public License
    18. *  along with ARToolKit for Unity.  If not, see <http://www.gnu.org/licenses/>.
    19. *
    20. *  As a special exception, the copyright holders of this library give you
    21. *  permission to link this library with independent modules to produce an
    22. *  executable, regardless of the license terms of these independent modules, and to
    23. *  copy and distribute the resulting executable under terms of your choice,
    24. *  provided that you also meet, for each linked independent module, the terms and
    25. *  conditions of the license of that module. An independent module is a module
    26. *  which is neither derived from nor based on this library. If you modify this
    27. *  library, you may extend this exception to your version of the library, but you
    28. *  are not obligated to do so. If you do not wish to do so, delete this exception
    29. *  statement from your version.
    30. *
    31. *  Copyright 2015 Daqri, LLC.
    32. *  Copyright 2010-2015 ARToolworks, Inc.
    33. *
    34. *  Author(s): Philip Lamb
    35. *
    36. */
    37.  
    38. using System;
    39. using System.Collections.Generic;
    40. using System.Linq;
    41. using System.Text;
    42. using System.Runtime.InteropServices;
    43. using UnityEngine;
    44.  
    45. public static class ARNativePlugin
    46. {
    47.     // The name of the external library containing the native functions
    48.     private const string LIBRARY_NAME = "AR6";
    49.  
    50.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    51.     public static extern void arwRegisterLogCallback(PluginFunctions.LogCallback callback);
    52.  
    53.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    54.     public static extern void arwSetLogLevel(int logLevel);
    55.  
    56.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    57.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    58.     public static extern bool arwInitialiseAR();
    59.  
    60.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    61.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    62.     public static extern bool arwInitialiseARWithOptions(int pattSize, int pattCountMax);
    63.  
    64.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    65.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    66.     public static extern bool arwGetARToolKitVersion([MarshalAs(UnmanagedType.LPStr)]StringBuilder buffer, int length);
    67.  
    68.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    69.     public static extern int arwGetError();
    70.  
    71.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    72.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    73.     public static extern bool arwShutdownAR();
    74.  
    75.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
    76.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    77.     public static extern bool arwStartRunningB(string vconf, byte[] cparaBuff, int cparaBuffLen, float nearPlane, float farPlane);
    78.  
    79.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
    80.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    81.     public static extern bool arwStartRunningStereoB(string vconfL, byte[] cparaBuffL, int cparaBuffLenL, string vconfR, byte[] cparaBuffR, int cparaBuffLenR, byte[] transL2RBuff, int transL2RBuffLen, float nearPlane, float farPlane);
    82.  
    83.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    84.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    85.     public static extern bool arwIsRunning();
    86.  
    87.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    88.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    89.     public static extern bool arwStopRunning();
    90.  
    91.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    92.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    93.     public static extern bool arwGetProjectionMatrix([Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix);
    94.  
    95.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    96.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    97.     public static extern bool arwGetProjectionMatrixStereo([Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixL, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixR);
    98.  
    99.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    100.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    101.     public static extern bool arwGetVideoParams(out int width, out int height, out int pixelSize, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBuffer, int pixelFormatBufferLen);
    102.  
    103.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    104.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    105.     public static extern bool arwGetVideoParamsStereo(out int widthL, out int heightL, out int pixelSizeL, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBufferL, int pixelFormatBufferLenL, out int widthR, out int heightR, out int pixelSizeR, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBufferR, int pixelFormatBufferLenR);
    106.  
    107.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    108.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    109.     public static extern bool arwCapture();
    110.  
    111.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    112.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    113.     public static extern bool arwUpdateAR();
    114.  
    115.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    116.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    117.     //public static extern bool arwUpdateTexture32([In, Out]Color32[] colors32);
    118.     public static extern bool arwUpdateTexture32(IntPtr colors32);
    119.  
    120.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    121.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    122.     //public static extern bool arwUpdateTexture32Stereo([In, Out]Color32[] colors32L, [In, Out]Color32[] colors32R);
    123.     public static extern bool arwUpdateTexture32Stereo(IntPtr colors32L, IntPtr colors32R);
    124.  
    125.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    126.     public static extern int arwGetTrackableAppearanceCount(int markerID);
    127.  
    128.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    129.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    130.     public static extern bool arwGetTrackableAppearanceConfig(int markerID, int patternID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix, out float width, out float height, out int imageSizeX, out int imageSizeY);
    131.  
    132.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    133.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    134.     //public static extern bool arwGetTrackableAppearanceImage(int markerID, int patternID, [In, Out]Color32[] colors32);
    135.     public static extern bool arwGetTrackableAppearanceImage(int markerID, int patternID, IntPtr colors32);
    136.  
    137.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    138.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    139.     public static extern bool arwGetTrackableOptionBool(int markerID, int option);
    140.  
    141.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    142.     public static extern void arwSetTrackableOptionBool(int markerID, int option, bool value);
    143.  
    144.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    145.     public static extern int arwGetTrackableOptionInt(int markerID, int option);
    146.  
    147.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    148.     public static extern void arwSetTrackableOptionInt(int markerID, int option, int value);
    149.  
    150.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    151.     public static extern float arwGetTrackableOptionFloat(int markerID, int option);
    152.  
    153.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    154.     public static extern void arwSetTrackableOptionFloat(int markerID, int option, float value);
    155.  
    156.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    157.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    158.     public static extern bool arwGetTrackerOptionBool(int option);
    159.  
    160.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    161.     public static extern void arwSetTrackerOptionBool(int option, bool value);
    162.  
    163.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    164.     public static extern int arwGetTrackerOptionInt(int option);
    165.  
    166.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    167.     public static extern void arwSetTrackerOptionInt(int option, int value);
    168.  
    169.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    170.     public static extern float arwGetTrackerOptionFloat(int option);
    171.  
    172.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    173.     public static extern void arwSetTrackerOptionFloat(int option, float value);
    174.  
    175.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
    176.     public static extern int arwAddMarker(string cfg);
    177.  
    178.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    179.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    180.     public static extern bool arwRemoveMarker(int markerID);
    181.  
    182.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    183.     public static extern int arwRemoveAllMarkers();
    184.  
    185.  
    186.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    187.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    188.     public static extern bool arwQueryMarkerVisibility(int markerID);
    189.  
    190.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    191.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    192.     public static extern bool arwQueryMarkerTransformation(int markerID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix);
    193.  
    194.     [DllImport(LIBRARY_NAME, CallingConvention=CallingConvention.Cdecl)]
    195.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    196.     public static extern bool arwQueryMarkerTransformationStereo(int markerID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixL, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixR);  
    197. }
    198.  
    199.  
    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using System.Linq;
    4. using System.Text;
    5. using System.Runtime.InteropServices;
    6. using UnityEngine;
    7.  
    8. public static class ARNativePluginStatic
    9. {
    10.  
    11.     #if UNITY_IOS
    12.     [DllImport("__Internal")]
    13.     public static extern void aruRequestCamera();
    14.     #endif
    15.  
    16.     [DllImport("__Internal")]
    17.     public static extern void arwRegisterLogCallback(PluginFunctions.LogCallback callback);
    18.  
    19.     [DllImport("__Internal")]
    20.     public static extern void arwSetLogLevel(int logLevel);
    21.  
    22.     [DllImport("__Internal")]
    23.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    24.     public static extern bool arwInitialiseAR();
    25.  
    26.     [DllImport("__Internal")]
    27.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    28.     public static extern bool arwInitialiseARWithOptions(int pattSize, int pattCountMax);
    29.  
    30.     [DllImport("__Internal")]
    31.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    32.     public static extern bool arwGetARToolKitVersion([MarshalAs(UnmanagedType.LPStr)]StringBuilder buffer, int length);
    33.  
    34.     [DllImport("__Internal")]
    35.     public static extern int arwGetError();
    36.  
    37.     [DllImport("__Internal")]
    38.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    39.     public static extern bool arwShutdownAR();
    40.  
    41.     [DllImport("__Internal", CharSet = CharSet.Ansi)]
    42.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    43.     public static extern bool arwStartRunningB(string vconf, byte[] cparaBuff, int cparaBuffLen, float nearPlane, float farPlane);
    44.  
    45.     [DllImport("__Internal", CharSet = CharSet.Ansi)]
    46.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    47.     public static extern bool arwStartRunningStereoB(string vconfL, byte[] cparaBuffL, int cparaBuffLenL, string vconfR, byte[] cparaBuffR, int cparaBuffLenR, byte[] transL2RBuff, int transL2RBuffLen, float nearPlane, float farPlane);
    48.  
    49.     [DllImport("__Internal")]
    50.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    51.     public static extern bool arwIsRunning();
    52.  
    53.     [DllImport("__Internal")]
    54.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    55.     public static extern bool arwStopRunning();
    56.  
    57.     [DllImport("__Internal")]
    58.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    59.     public static extern bool arwGetProjectionMatrix([Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix);
    60.  
    61.     [DllImport("__Internal")]
    62.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    63.     public static extern bool arwGetProjectionMatrixStereo([Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixL, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixR);
    64.  
    65.     [DllImport("__Internal")]
    66.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    67.     public static extern bool arwGetVideoParams(out int width, out int height, out int pixelSize, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBuffer, int pixelFormatBufferLen);
    68.  
    69.     [DllImport("__Internal")]
    70.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    71.     public static extern bool arwGetVideoParamsStereo(out int widthL, out int heightL, out int pixelSizeL, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBufferL, int pixelFormatBufferLenL, out int widthR, out int heightR, out int pixelSizeR, [MarshalAs(UnmanagedType.LPStr)]StringBuilder pixelFormatBufferR, int pixelFormatBufferLenR);
    72.  
    73.     [DllImport("__Internal")]
    74.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    75.     public static extern bool arwCapture();
    76.  
    77.     [DllImport("__Internal")]
    78.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    79.     public static extern bool arwUpdateAR();
    80.  
    81.     [DllImport("__Internal")]
    82.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    83.     //public static extern bool arwUpdateTexture32([In, Out]Color32[] colors32);
    84.     public static extern bool arwUpdateTexture32(IntPtr colors32);
    85.  
    86.     [DllImport("__Internal")]
    87.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    88.     //public static extern bool arwUpdateTexture32Stereo([In, Out]Color32[] colors32L, [In, Out]Color32[] colors32R);
    89.     public static extern bool arwUpdateTexture32Stereo(IntPtr colors32L, IntPtr colors32R);
    90.  
    91.     [DllImport("__Internal")]
    92.     public static extern int arwGetTrackableAppearanceCount(int markerID);
    93.  
    94.     [DllImport("__Internal")]
    95.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    96.     public static extern bool arwGetTrackableAppearanceConfig(int markerID, int patternID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix, out float width, out float height, out int imageSizeX, out int imageSizeY);
    97.  
    98.     [DllImport("__Internal")]
    99.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    100.     //public static extern bool arwGetTrackableAppearanceImage(int markerID, int patternID, [In, Out]Color32[] colors32);
    101.     public static extern bool arwGetTrackableAppearanceImage(int markerID, int patternID, IntPtr colors32);
    102.  
    103.     [DllImport("__Internal")]
    104.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    105.     public static extern bool arwGetTrackableOptionBool(int markerID, int option);
    106.  
    107.     [DllImport("__Internal")]
    108.     public static extern void arwSetTrackableOptionBool(int markerID, int option, bool value);
    109.  
    110.     [DllImport("__Internal")]
    111.     public static extern int arwGetTrackableOptionInt(int markerID, int option);
    112.  
    113.     [DllImport("__Internal")]
    114.     public static extern void arwSetTrackableOptionInt(int markerID, int option, int value);
    115.  
    116.     [DllImport("__Internal")]
    117.     public static extern float arwGetTrackableOptionFloat(int markerID, int option);
    118.  
    119.     [DllImport("__Internal")]
    120.     public static extern void arwSetTrackableOptionFloat(int markerID, int option, float value);
    121.  
    122.     [DllImport("__Internal")]
    123.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    124.     public static extern bool arwGetTrackerOptionBool(int option);
    125.  
    126.     [DllImport("__Internal")]
    127.     public static extern void arwSetTrackerOptionBool(int option, bool value);
    128.  
    129.     [DllImport("__Internal")]
    130.     public static extern int arwGetTrackerOptionInt(int option);
    131.  
    132.     [DllImport("__Internal")]
    133.     public static extern void arwSetTrackerOptionInt(int option, int value);
    134.  
    135.     [DllImport("__Internal")]
    136.     public static extern float arwGetTrackerOptionFloat(int option);
    137.  
    138.     [DllImport("__Internal")]
    139.     public static extern void arwSetTrackerOptionFloat(int option, float value);
    140.  
    141.     [DllImport("__Internal", CharSet = CharSet.Ansi)]
    142.     public static extern int arwAddMarker(string cfg);
    143.  
    144.     [DllImport("__Internal")]
    145.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    146.     public static extern bool arwRemoveMarker(int markerID);
    147.  
    148.     [DllImport("__Internal")]
    149.     public static extern int arwRemoveAllMarkers();
    150.  
    151.  
    152.     [DllImport("__Internal")]
    153.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    154.     public static extern bool arwQueryMarkerVisibility(int markerID);
    155.  
    156.     [DllImport("__Internal")]
    157.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    158.     public static extern bool arwQueryMarkerTransformation(int markerID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrix);
    159.  
    160.     [DllImport("__Internal")]
    161.     [return: MarshalAsAttribute(UnmanagedType.I1)]
    162.     public static extern bool arwQueryMarkerTransformationStereo(int markerID, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixL, [Out][MarshalAs(UnmanagedType.LPArray, SizeConst=16)] float[] matrixR);  
    163. }
    164.  
    165.  
     
    Last edited: Oct 16, 2019
  5. jchuen87

    jchuen87

    Joined:
    Oct 24, 2019
    Posts:
    1
    I'm using ARToolkit too and got the same error. Have you solved it yet?