# Using the SDK

## Streaming 3D assets into Unity

Let's start with something simple.

1. Open the `Prefabs` folder within the `echo3D Unity SDK` package folder and add the `Echo3DService` prefab to any scene where you wish to load assets.

![](https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2Fw8JFrLUimXsUqWBIkuZx%2Fadd_service_to_scene.gif?alt=media\&token=d8074ca7-2ae5-416a-bdaa-cd0701919782)

2\. Add the `Echo3DHologram` prefab from the same folder to your scene.&#x20;

This is an empty game object with the `Echo3DHologram.cs` script attached to it.

You can also simply add the `Echo3DHologram.cs` script to any existing game object.

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FbKWJr3J8jLwdWNE8jGAw%2Fadd_holoprefab_to_scene.gif?alt=media&#x26;token=2737de96-ef46-440b-96d8-9f4e0da0f37a" alt=""><figcaption></figcaption></figure>

3\. In the Inspector View for the game object with the `Echo3DHologram.cs` script, update the `API Key` field with your [API key](https://docs.echo3d.com/quickstart/get-api-key).

![](https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FjivkexKQCyHl2yYXYVJg%2Fenter_api_key.gif?alt=media\&token=a49a5c5d-475b-48be-a04e-1f2dc791fb96)

Your `API Key` and `Entry ID` can be found in your console:

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FD2HlXazpEy85DHn2ZJCS%2FAPIKeyAndParentPrefabGIF.gif?alt=media&#x26;token=1bfac08a-0096-407a-95eb-dec487bd2741" alt=""><figcaption></figcaption></figure>

4\. Type your [Secret Key](https://docs.echo3d.com/web-console/manage-pages/collections-and-sharing/security#secret-key) as the value for the parameter `secKey` in the file `Packages/co.echo3D.unity/Runtime/Echo3DHologram.cs`.

{% hint style="warning" %}
This is applicable only if you have the [Secret Key](https://docs.echo3d.com/web-console/manage-pages/collections-and-sharing/security#secret-key) option enabled.
{% endhint %}

![](https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FoTtlgFTTs9S0tuuIAlrV%2FsecKey.png?alt=media\&token=5f0bc833-ea87-4e15-b704-cb0739aa9dd1)

5\. [Add a 3D model](https://docs.echo3d.com/quickstart/add-a-3d-model) through the [console](https://console.echo3d.co). Here's how:

{% content-ref url="../quickstart/add-a-3d-model" %}
[add-a-3d-model](https://docs.echo3d.com/quickstart/add-a-3d-model)
{% endcontent-ref %}

![](https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FMKb7HFkyXPFYDsLpugim%2F3.2.%20Add%203D%20Model%20-%20New%20-%20Cropped.gif?alt=media\&token=4b111d2e-9b67-45a0-ad7b-8cb3a6b27e17)

6\. Go back to Unity and hit the **Play** button.

The SDK will stream the 3D model into Unity.

![](https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FX8TurGcLKhtalcCyJE3o%2Funity_press_play.gif?alt=media\&token=ee5e7e51-7acc-40a1-9f20-6986036b9a99)

**All done!** 🎉

### Video Tutorial

Here's a tutorial that can guide you through the steps shown above:

{% embed url="<https://youtu.be/98bebj0g674>" %}

## Viewing the demo scene

The SDK includes a robust demo scene preconfigured to load assets (models, images, and videos) from our platform. Follow these steps to run the scene:

1. In the top menu, click `Window` and then `Unity Package Manager`.
2. Add the scene to your project by importing the package samples via the Unity Package Manager. Under `Packages - echo3D` select `echo3D Unity SDK` and click Import on the right side of the screen.

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FaKNgonyYvs7cLgtK8Rh9%2Fimport_sample.png?alt=media&#x26;token=6125f6a8-d628-4d30-bc62-63ad783a16e0" alt=""><figcaption></figcaption></figure>

2\. A `Samples` folder will be created within your project `Assets`folder. Open the `Echo3DDemo`scene.

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FageBKAt5jReix8RkUqa4%2Fopen_scene.png?alt=media&#x26;token=cf4f97b7-7274-4117-92cb-76d84f3823d6" alt=""><figcaption></figcaption></figure>

3\. Press "Play" to run the demo scene. Assets will stream and instantiate within the scene. **Note: An internet connection is required.**&#x20;

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FCqvy0ABHq63tAxyjDOjF%2Floaded_demo_scene.png?alt=media&#x26;token=4cfb1d5a-28bd-402e-b30a-37006bc36b1f" alt=""><figcaption></figcaption></figure>

**All done!** 🎉
