🧰 Using the SDK

Learn how to use our Unity SDK.

Streaming 3D holograms into Unity

Let's start with something simple.

  1. Either open the sample scene under Assets/echoAR/Examples/sample

or create a new empty game object and attach the script echoAR/echoAR.cs to it.

2. In the Inspector View for the echoAR game object or the empty game object that you created, update the API Key field with your API key.

3. Add a 3D model through the console. Here's how:

4. Go back to Unity and hit the Play button. The SDK will stream the 3D model into Unity.

Great work! 🎉

Real-time updates and animations

You can go back to the console to add more 3D models, delete 3D models, add metadata, or change existing metadata associated with your entry and instantly see the changes in Unity even while the Unity project is running.

For example, lets add metadata with the key direction and the value right. Here's how:

This will make the 3D model rotated to the right.

Build-in keywords

The following keys are words the system uses as pre-defined metadata keys to control real-time transformations:

Keyword

Type

Options

Effect

x

float

Any positive or negative number

Moves the hologram on the x-axis

y

float

Any positive or negative number

Moves the hologram on the y-axis

z

float

Any positive or negative number

Moves the hologram on the z-axis

scale

float

Any positive number

Grows or shrinks the hologram uniformly

direction

string

"right" or "left"

Continuously rotates the model on its center

xAngle

float

Any positive or negative number

Rotates the model on the x-axis

yAngle

float

Any positive or negative number

Rotates the model on the y-axis

zAngle

float

Any positive or negative number

Rotates the model on the z-axis

mute

boolean

Either 'true' of 'false'.

Default value 'false'.

Mute the sound of a video hologram.