Start a Unity Project
Create a Unity project from the Unity Hub. Add the following DLLs for reference within the project:
These DLLs supply the necessities for a LiveSwitch Unity project:
- Image converters
- Video and audio capture
- DTLS security
The scripting backend for LiveSwitch’s Unity SDK must be Intermediate Language to C++ (IL2CPP) for mobile platforms. Read more on IL2CPP here.
Use the following files to build the ILC2CPP scripting backend:
You might need additional files and steps depending on the platform you want for your Unity project. Find these files in the
Libraries directory of your install and the
plugins directory of the Unity example.
Apply DLLs and Other Files
Use the following files for a Windows build in Unity:
Use a set of these DLL files each for both x64 and x86 CPU architectures.
macOS isn't supported.
You need the following SO files for a Linux build in Unity:
You need the following A files for an iOS build in Unity:
In your build settings, do the following:
- Under Player > iOS > Other Settings, add a Camera Usage Description.
- Under Player > iOS > Other Settings, add a Microphone Usage Description.
After generating the Xcode project for iOS, set the required build permissions using
chmod a+x MapFileParser.sh.
In your Xcode target settings for Unity-iPhone, under Signing & Capabilities, choose a provisioning file and team.
In your Xcode target settings for UnityFramework. do the following:
- Under Build Settings > Build Options, set Enable Bitcode to No.
- Under Build Phases > Link Binary with Libraries, move the native LiveSwitch Libraries to the top of the list:
Ensure that you apply the Build Phases change to the UnityFramework project.
If you don't have the LiveSwitch libraries listed at the top of the list, following error occurs:
Could not initialize VPX encoder. ABI version mismatch
These steps are necessary for the first build and any subsequent builds that use the replace Xcode project generation mode. Read more here. Using the
append Xcode project generation mode doesn't overwrite these changes.
You need the following SO files for an Android build in Unity:
Use a set of these SO files each for the Arm64-v8a, Armeabi-v7a, and x86 CPU architectures.
If you are looking to transfer to an older Unity Version, like from Unity 2019 to Unity 2018, make sure you reset the packages to avoid library corruption. Reset the packages by going to Help > Reset Packages by Default.