Link

Set up your Litho project

Litho beta release 0.6.0 (2019-12-16)

Table of contents

  1. Video tutorial
  2. Instructions for first use of the Litho SDK
    1. Create your project
    2. Import the Litho Unity package into your Unity project
    3. Prepare your project
    4. Set up your Game view for mobile compatibility
    5. Manual Setup
      1. iOS
      2. Android
      3. Common Steps

Video tutorial


Instructions for first use of the Litho SDK

Create your project

  1. Open Unity Hub
  2. 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
  3. 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_ iOS and Android build support
  4. 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 Create a new project

Import the Litho Unity package into your Unity project

  1. 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
  2. Unzip/decompress the Litho SDK .zip file
  3. Using Mac’s Finder app or Windows Explorer (in a new window), open the root folder of the Unity project you created for Litho
  4. Drag and drop the unzipped Litho package into the Packages folder of your Unity project

Add package from disk

  1. 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)
  2. 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
  3. 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. Catalina security message

Prepare your project

  1. If your project supports iOS devices, click LITHO -> Project Setup -> Import iOS Packages in the Unity Editor menu bar (this will automatically install ARKit packages and switch to iOS build platform)
  2. If your project supports Android devices, click LITHO -> Project Setup -> Import Android Packages in the Unity Editor menu bar (this will automatically install ARCore packages and switch to Android build platform) Project setup
  3. 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
  4. 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
  5. 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

  1. Open the Game view (Window -> General -> Game)
  2. 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)
  3. 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
  4. Ensure the Scale slider is set to the lowest possible value

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.