Getting started with the Appearition Unity SDK#
What is the Appearition Unity SDK#
The Appearition Unity Software Development Kit, SDK, is a Unity package that includes the sets of functions that enables access to services provided by the Appearition Platform by client apps produced through Unity. Our Appearition Unity SDK enables the creation of cloud distributed and managed client apps.
Most SDK functions have the same name as the Appearition Platform APIs that they use, however, some SDK functions may be focused on device support, so some SDK functions may not align with API names.
Working knowledge of how to import and use Unity packages in Unity
Unity 2020.1 or later
For a quick take-off#
Why don’t you start by using the demos provided by the Appearition Unity SDK package. You may find that you only need to make a few minor changes to the demo you select to get the outcomes you need.
Requirements checklist before importing the Appearition Unity SDK package into Unity#
Ensure you have an Appearition Platform account.
Once subscribed to an Appearition Platfom account you will have access to a tenant and at least one channel (or perhaps more than one channel, if that is how your administrator set up your account). At this point you should ensure that you have uploaded and configured the digital assets your app will be using.
Ensure you have set up Unity for the specific AR integration you are planning. We present various integration examples in the demos included with the Appearition Unity SDK package v0.7.4 (or later)
Download and then import the Appearition Unity SDK package into your Unity project.
Using the Appearition SDK#
To get started using the Appearition SDK for Unity, you will need the AppearitionManager to be present in your scene. This prefab can be found under Appearition/Prefabs. Alternatively, you can create a new GameObject and add the AppearitionGate component on it.
The Appearition Gate may look like this:
Do note that this may vary based on your SDK version and Unity pro theme.
In order to proceed, you will need to create a user profile, which contains information about the Appearition Platform tenant, channel and application token you are using in your app. User profiles are used to switch between tenants and channels, enabling fast development in what otherwise would become a very complex asset management and distribution challenge.
Filling in your Appearition access details in the Appearition Gateway#
Assuming you have an Appearition Account, you can get the information about your app profile by following these steps that will guide through the use of the Appearition Swagger Service.
You must complete the information in the Appearition Gateway or your app will fail to access its Appearition host (Expect exception logs if this happens!!!)
Create a new user profile for your app by clicking on the “Create New” button.
Select the Appearition platform closest to your region.
Fill in the rest of your Appearition client profile by reference to the information you obtained from the Appearition Swagger Service:
The Channel Id refers to the id of the channel you will be targeting. 0 Will effectively target all the channels in the selected tenant *
If you are unsure about how to get any of the information above, please contact the Appearition Support Team.
What does the Appearition Gateway do once its client app profile is completed, and the application is run?#
The Appearition Gateway object by itself, will access the Unity Platform when the client app is running (even during an Editor Play session). The Gateway gets an asset manifest (a JSON array object) which contains all the information about the digital media you have uploaded into the platform. This includes the description of object poses and scales, and their access or download protocol. Any binary objects, that is your media files, will either be downloaded or streamed during application instantiation, at specific trigger events, or when streaming assets are required as per instructions inserted into the JSON manifest that the system has downloaded. These instructions are created by configuration options you select when you upload and set up media through the Appearition platform.
You may want to check out what is downloaded when you “play” your scene with a configured Appearition gateway. All assets will be downloaded to locations in your system that the device platform is permitted to access.
In the case of Unity running in a Windows environment, the folder location to inspect is “C:/Users/(your local account name)/AppData/LocalLow/(Company Name: found in Unity Project settings, in player settings).Eg. C:/Users/Prosper/AppData/LocalLow/Appearition. For other platforms the device storage folders will be defined by the same structure returned by the “Application.persistentDataPath” call in Unity.
Other functionality accessible through the SDK will include access to different services (eg. AR Target and Media, content library, location, user options like login/authentication, IoT alarm notification, etc)…
A High level tour of the SDK#
If you have any question, please contact the Appearition Support Team
Thank you and have a very creative day!