Litho beta release 0.5.1 (02/12/2019)
- Augmented Reality and Litho Interaction
- Litho Showcase Scene
- LithoARSessionOrigin Object
- ARCamera Object
- Litho Object
- Showcase Object
- Litho Event Helper Prefab
Below is a brief overview of the recommended augmented reality (AR) interaction flow to use with Litho. The AR side of the system is handled by Unity's AR Foundation, which is explained briefly here. The Litho SDK sits within the AR Foundation framework, which allows you to tangibly reach into any AR experiences that you make. The following sections explain the objects that make up the Litho interaction system. The Litho showcase scene provides a smorgasbord of example implementation of the components described below.
The easiest way to get started with Litho is to take a look at the Litho showcase scene: it illustrates some basic types of interaction that can be achieved using Litho. You can then use the demo objects as a basis for your own interactions.
- In your Unity project, open this scene by double-clicking on Assets/Litho/Demo/LithoShowcase/LithoShowcase.unity Ensure you have set up your project first.
It is highly recommended that you look through the features available in the Litho showcase before getting started with your own project. Future updates and new Litho interactions will be demonstrated in the showcase.
| Description | Hierarchy |
|---|---|
|
![]() |
To make Litho work in AR, the project relies on the AR Foundation package. This prefab contains the other Litho and AR objects required to make the scene work. A basic overview is given below, but more detail on AR Foundation can be found here. How Litho's interactions work in Unity is covered in more detail here.
| Description | Inspector |
|---|---|
|
![]() |
This represents the real-world (mobile phone) AR camera and makes the Unity scene camera match its position.
| Description | Inspector |
|---|---|
|
![]() |
The Litho object represents your Litho device in the scene (Only 1 copy of this object/ script should exist in your scene.) The laser pointer is cast from this object, which is automatically positioned relative to the camera. The Litho object prefab can be found in the demo scene and should be a child of the ARSessionOrigin object. When building your own Litho scene, make the Litho prefab a child of the ARSessionOrigin object, and ensure you provide the Litho object with a reference to the main AR camera object in your scene. Further details can be found here
| Description | Inspector |
|---|---|
|
![]() |
The Floor object represents the height of the ground in AR space, which is updated by the World Interpreter script (via the Ground Plane Unity Inspector field). Objects that rest on or interact with the floor should have the Floor object as their parent - this will ensure they don't get occluded (visually or physically) by the Ground Plane object.
The Ground Plane object hosts a large box collider, which is positioned as a child of the Floor object to prevent objects from falling through the floor - this simplifies AR scanning of the floor, as the entire floor becomes physically present after choosing a single point on the scanned floor.
The Ground Plane object also hosts two different meshes - one for use in the Unity Editor (shows a visible plane), and one for built AR apps (implements AR occlusion and shadows). These are automatically deleted from the Editor/ builds as appropriate.
The Showcase object collates a variety of interaction prefabs into a small platform that is suitable for manipulation in AR. The interaction prefabs serve as examples of how to implement interactions with the Litho Pointer. The examples can be navigated by using the Litho pointer to click the arrow buttons on the showcase platform. Inspect these these objects in the Unity Hierarchy window to learn more about how to implement different interactions, and look here for more details.
Note: the Showcase object is set as the Focus Object of the
ARManageron the LithoARSessionOrigin object - this ensures it is positioned correctly when a ground plane is selected.
| Game View | Hierarchy and Inspector |
|---|---|
![]() |
![]() |
More information about how these showcase objects work is provided here.
The Litho Event Helper object can be added to your scene to help you understand [Litho global events(UnityScripting.md#litho-events) prints Litho global events (and their parameters) to the Unity Console as they happen. This event logging can be toggled on or off using the Log Global Litho Events field.
The Litho Event Helper object is not critical to the Litho system - you can delete this object without any issues occurring, or simply disable the Litho Global Event Logger script (uncheck the Log Global Litho Events field) if the logging becomes obtrusive.
The code in the Litho Global Event Logger script can also be viewed as an example of how to access the events exposed by the Litho script - other code samples for Litho events can be found here.
Wearing and using Litho (external link)
Learn how the Litho demo scene works
Build your scene for iOS or Android
> Integrate Litho into your Unity scene
Test your scene using the Litho Emulator






