FAQ Troubleshooting Unity SDK 14.0.0
- Configure dlls in Unity (see solutions 2 and 3 below)
- Update pods to newest version if you are building for iOS
pod install output:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
In Podfile:
FBSDKCoreKit (~> 14.0)
None of your spec sources contain a spec satisfying the dependency: FBSDKCoreKit (~> 14.0)
Solution:
Update pods - reference: https://stackoverflow.com/questions/67134352/cocoapods-could-not-find-compatible-versions-for-pod-fbsdkcorekit
Potential error messages you may see while trying to build:
Exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/2020.3.24f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/mn/hy9q4vf566g704xmjmwqlxxm0000gn/T/tmpvYkXj8.tmp" -o
Solution:
This is an indication of mis-configuration of dlls in Unity. When Unity SDK is imported into Unity, unfortunately Unity reconfigures all dlls to 'All Platforms' and this causes an issue when building on a particular platform. The way to resolve this, is to reconfigure the dlls. You will find them in Unity under FacebookSDK -> Plugins and all the dlls are under their various platform folders such as Android / Canvas / Editor / iOS etc. Click on them and an inspector will appear (attached screenshot). The example attached shows the configuration for an Android dll. Uncheck All Platforms (if needed) and select Android. Do the same for the rest:
- Android.DLL to Android platform
- IOS Dll to iOS platform
- Canavs to webgl
Solution:
A clean way to resolve this if you are not building for windows platform, is to delete the irrelevant windows dlls or either one folder (x86/x64) if you do not require them. If you need both, then do the same as solution #2 above for each windows dll and set them to as below for both x86 / x64 dlls.
Error in Unity console log:
InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. UnityEngine.EventSystems.BaseInput.GetButtonDown (System.String buttonName) (at [...]/Runtime/EventSystem/InputModules/BaseInput.cs:126) UnityEngine.EventSystems.StandaloneInputModule.ShouldActivateModule () (at [...]/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:229) UnityEngine.EventSystems.EventSystem.Update () (at [...]/Runtime/EventSystem/EventSystem.cs:358)
Solution:
If you want to use the new Input System in your Unity Game and our UnitySDK, you need to set the Active Input Handling to BOTH. This is because UnitySDK v14 requires the old input manager. This issue will be fixed in the next version.