Set up your Litho project
Litho beta release 0.6.1 (2020-05-14)
Table of contents
Video tutorial
Instructions for first use of the Litho SDK
Create your project
- Open Unity Hub
- Ensure you have Unity version 2019.3 installed; in Unity Hub, go to Installs and either find the required version, or click Add to install it. Alternatively, you can download different versions of Unity here. Please note:
- Other Unity versions may work but are not yet tested
- Alpha and Beta versions are not recommended
- Older versions are unlikely to support the required AR Unity packages
- Ensure the chosen Unity version has iOS Build Support or Android Build Support (including Android SDK & NDK Tools and OpenJDK) installed, as relevant. Note that you must have one of these options installed.
- If not installed, the additional options menu (three dots next to the chosen Unity version on the Installs tab) should allow you to install it via the _Add Modules option_
- On the Projects screen, use the dropdown menu next to the New button to create a new 3D project with Unity 2019.3, then open it
Import the Litho Unity package into your Unity project
- Locate the Litho SDK .zip file (e.g. litho-beta-2019-10-16-v0-4-2.zip) - i.e. find it in your downloads folder, or download it if you have not done so already
- Unzip/decompress the Litho SDK .zip file
- Using Mac’s Finder app or Windows Explorer (in a new window), open the root folder of the Unity project you created for Litho
- Drag and drop the unzipped Litho package into the Packages folder of your Unity project
- If you are upgrading your Litho SDK package from a previous version, you can now delete the old version (however Unity should automatically use the latest version)
- Return to your project in Unity - Unity will automatically install the Litho assets into your project; these assets can be found in the Unity Project window, under Litho Beta SDK
- If you are using OSX Catalina, you may be prompted with a security notice, similar to the one pictured below. If this happens, you will need go to System Preferences -> Security & Privacy -> Allow apps… and specify that the Litho SDK is permitted to run on your computer.
Prepare your project
- If your project supports iOS devices, click LITHO -> Project Setup -> Configure for iOS in the Unity Editor menu bar (this will automatically install ARKit packages and switch to iOS build platform)
- If your project supports Android devices, click LITHO -> Project Setup -> Configure for Android in the Unity Editor menu bar (this will automatically install ARCore packages and switch to Android build platform)
- If your project supports iOS devices, check that mobile architecture is set appropriately (only ARM64 is supported by ARKit):
- In Unity, go to Project Settings -> Player -> iOS tab (click the mobile phone icon) -> Other Settings -> Configuration
- Set Architecture to ARM64
- If your project supports Android devices, check that Vulkan Graphics API is disabled (as it is not supported by ARCore):
- In Unity, go to Project Settings -> Player -> Android tab (click the Android icon) -> Other Settings -> Rendering -> Graphics APIs
- Select Vulkan
- Click the minus (-) icon to remove it from the list
- Check that your graphics settings are suitable for mobile devices - this will be application specific:
- Look in Project Settings -> Quality
- Make sure the default level for your chosen platform is high enough to support your desired graphics settings (click the arrow at the bottom of the list of Levels to change the default)
- It is recommended that you enable shadows, as these greatly improve AR experiences - the default level for your chosen platform will likely need to be at least Medium for this
- Check Project Settings -> Graphics for other graphics settings
Set up your Game view for mobile compatibility
The Litho user interface is designed for iPhone X (2436x1125, Portrait), however other resolutions should scale dynamically
- Open the Game view (Window -> General -> Game)
- Open the resolution drop-down menu in the top-left of the Game view (it may read as “Free Aspect” or “iPhone 5 Tall”, for example)
- Select your chosen mobile phone screen resolution or create a new option by clicking the “+” at the bottom of the list - the options available will depend on the build platform selected in Unity Build Settings
- Ensure the Scale slider is set to the lowest possible value
The first time you connect to your Litho it may drift. To resolve this put your Litho on a table while it is still connected to the app, and leave completely still for 30 seconds. Then recalibrate.
Manual Setup
The “Project Setup” menu options should configure most settings as required for Litho. If you have issues with the automated process described above, you can try applying the following settings manually:
iOS
Within the Package Manager:
- Install
com.unity.xr.arkit@3.1.0-preview.1
Within the Player Settings:
- Add Usage strings for the Camera and Location permissions
- Set the Target iOS Version to 12.2
- Set the “Requires Full-screen” option to True
- Set the default UI orientation to Portrait
Android
Within the Package Manager:
- Install
com.unity.xr.arcore@3.1.0-preview.1
using the Package Manager
Within the Player Settings:
- Set “ARCore Enabled” to False (this option is handled by the ARCore package)
- Set the Target Android SDK Version to 26
- Set the “Starts in Full-screen” option to True
- Set the default UI orientation to Portrait
Common Steps
Finally, within the Build Settings menu, ensure that the correct Platform is selected (this is indicated by the Unity logo next to it). “Switch Platform” if required.