-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
il2cpp support #35
Comments
This plugin doesn't support ios to the best of my recollection. I also haven't tested il2cpp on Android, but I'm surprised that it doesn't work out of the box. Unfortunately, I really can't spend time working on this plugin anymore, but if you have any more errors / tests I can maybe point you in the right direction. |
I build opus with https://trac.pjsip.org/repos/ticket/1904 this description and xcode saw library i thing only problem on il2cpp on unity.. Do you thing using this is work? |
I think that using the opus c and .h files could work, but I think it'd be making your life more difficult. I think the easiest solution would be to just use the compiled opus libraries that are already in the repo. |
Any new update on this issue? |
I haven't looked into this personally, if you try something and hit an error you're welcome to post it here and I can take a look |
Thank you for response, |
Hmm, I'm seeing other people with some similar issues in other repos. I think we need to change the DLLImport. You might want to change this line so that the __Internal name is being used for IL2CPP...Not sure if that will do the trick however |
I did this and now I get error in build process(Building Native Binary with IL2CPP) : Failed running C:\Program Files\Unity 2019.4.5f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\Amirhosein@ActiveProjects\Aflatoon\mumble\Mumble-Unity\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\Amirhosein@ActiveProjects\Aflatoon\mumble\Mumble-Unity\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity 2019.4.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity 2019.4.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/_ndk-r19/android-ndk-r19" --profiler-report --map-file-parser="C:/Program Files/Unity 2019.4.5f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/Amirhosein/@ActiveProjects/Aflatoon/mumble/Mumble-Unity/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/Users/Amirhosein/@ActiveProjects/Aflatoon/mumble/Mumble-Unity/Temp/StagingArea/Il2Cpp/il2cppOutput stdout: C:\Users\Amirhosein@ActiveProjects\Aflatoon\mumble\Mumble-Unity\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:32411: error: undefined reference to 'opus_encoder_ctl' at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files_ndk-r19\android-ndk-r19\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Amirhosein\AppData\Local\Temp\tmp7850.tmp" -o "C:\Users\Amirhosein@ActiveProjects\Aflatoon\mumble\Mumble-Unity\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_3822D0B563B449C5F5D3A11D75C42936\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe C:\Users\Amirhosein@ActiveProjects\Aflatoon\mumble\Mumble-Unity\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:32411: error: undefined reference to 'opus_encoder_ctl' at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet UnityEngine.Debug:LogError(Object) |
Seems that that did not do the trick. What arch is your android phone? |
Good news, DllNotFoundExeption solved! I used the opus android plugin in this repo: https://github.com/TyounanMOTI/UnityOpus Bad news, new error: |
I had meant Photon Voice, not just Photon. The error you listed looks like unity stripped something out that it should not have. You can change that in PlayerSettings > ManagedStrippingLevel |
I removed files and folders in Plugins>Android and copied unityopus.aar there. Also changed "pluginName" in "NativeMethods" class to "unityopus", like this: I disabled ManagedStrippingLevel but the error still remains. |
Unfortunately, adding that link.xml did not solve the problem. I think the problem is .NET version. Unity has removed .NET3.5 from Api Compatibility Levels and now it is forced to .NET4.x. Maybe we need protobuf-net.dll that targets .NET4.x. I searched but I could not find one. Hope you can help. |
I don't think so, the error you got really looks like either IL2CPP is not generating some needed code, or IL2CPP is stripping something needed. I think a NET version difference error would look quite different. For next steps, I think you want to figure out which of those two possibilities it is. You might want to write some reflection code yourself to see which fields are available. Sorry I can't be more helpful |
I will try Script Backend il2cpp Not working on Android and Ios.
When try on Android:
It's not send debug to editor. I connect with breakpoint it's give Culture error on Debug.log side
When try Ios:
On load give error like
Exception: Encoder error - BadArgument
at Mumble.OpusEncoder.set_EnableForwardErrorCorrection (Boolean value) [0x00000] in :0
at Mumble.OpusCodec.InitializeEncoderWithSampleRate (Int32 newSampleRate) [0x00000] in :0
at MumbleTester.Start () [0x00000] in :0
I thing can't load static lib Unity on il2cpp.
It's working on mono Script Backend but Ios only selected il2cpp.
Any idea?
The text was updated successfully, but these errors were encountered: