Getting started with HISPlayer consists of implementing the following steps:
-
Import and configure SDKs
1.1. Import Unity Packages
1.2. Import HISPlayer SDK
1.3. Configure Unity for Android
1.4 Configure OpenXR and Android XR
-
HISPlayer AndroidXR Sample
2.1 Import HISPlayer AndroidXR Sample
You must install a set of specific packages to ensure AndroidXR and the VR interactions work correctly.
-
In the top menu bar, go to Window > Package Manager.
-
In the Package Manager window, click the dropdown menu in the top-left corner (it usually says Packages: In Project by default) and select Packages: Unity Registry.
-
Use the search bar in that says “Search in Unity Registry” to find and select each of the following packages, then click the Install button for each one:
- Unity OpenXR Android XR
- XR Interaction Toolkit
- XR Composition Layers
-
Import Starter Assets:
- In the Package Manager, select the installed XR Interaction Toolkit from the list.
- On the right-side panel, click on the Samples tab.
- Locate Starter Assets in the list and click the Import button next to it.
- Import TMP Essentials (For UI Text):
- In the top menu bar, go to Window > TextMeshPro > Import TMP Essential Resources.
- A new pop-up window will appear. Click the Import button.
Importing the SDK is the same as importing other normal packages in Unity. Select the package of HISPlayer SDK and import it.
Assets > Import Package > Custom Package > HISPlayer XR SDK unity package
Select the package of HISPlayer SDK and import it.
Open the window Tools > HISPlayer located in the upper side of the screen > Click on Player Settings Configuration > Select Build Target to Android > Set all the required settings.
Setting "Plugins folder" will create mainTemplate.gradle and gradleTemplate.properties in your ProjectRoot\Assets\Plugins\Android. Please make sure you use the correct mainTemplate.gradle that is generated from our SDK. If you need to modify it, please make sure the dependencies and configurations from HISPlayer SDK's mainTemplate.gradle exist in your modified gradle file.
It is recommended to set Target API Level to 34 or higher. By selecting Android target 34, Unity is going to ask you to update (in the case you don't have the SDK installed). Please, press "Update Android SDK" button.
Alternatively, you may set the Target API level to 34 or higher in the Unity project settings.
XR Plugin Management Setup:
- Go to the top menu bar and click Edit > Project Settings.
- In the left-hand list of the Project Settings window, scroll down and select XR Plug-in Management.
- In the main panel, click on the Android Tab.
- Check the box next to OpenXR in the Plug-in Providers list.
- Check the box next to Android XR feature group in the OpenXR.
- If a yellow/red warning triangle appears next to OpenXR, click on the triangle icon. A validation window will pop up. Click the Fix All button to automatically resolve configuration issues.
OpenXR Settings:
- In the left-hand list of the Project Settings window, click on OpenXR (located directly under XR Plug-in Management).
- Interaction Profiles:
- Look for the "Interaction Profiles" section.
- Click the "+" (plus) icon under the list.
- Select Khronos Simple Controller Profile. This is needed to support hand tracking.
- Click the "+" (plus) icon again.
- Select Oculus Touch Controller Profile or other controller profile depending on your VR headsets. This is needed to support 6DoF (Six Degrees of Freedom) controllers.
- OpenXR Feature Groups:
- Scroll down to the bottom of the OpenXR settings panel.
- Check the box for Android XR Support.
- Check the box for Composition Layer Support.
Please, download the sample here: AndroidXRSample (no need to download it if you have received it in the email).
Before using the sample, please make sure you have followed the above steps to set-up your Unity project for and HISPlayer SDK. To use the sample, please follow these steps :
- Configure OpenXR
- Import HISPlayer SDK
- Import HISPlayer AndroidXR Sample
- Open Assets/AndroidXRSample/Scenes/HEVC_8K.unity
- Import TextMeshPro. Go to Unity Window > TextMeshPro > Import TMP Essential Resources
- If you received a license key from HISPlayer, input the license key through the Inspector Unity window: StreamController GameObject > HISPlayerSample component > License Key
- Open File > Build Settings > Add Open Scenes
- Build and Run
To check how to set up the SDK and API usage, please refer to Assets/AndroidXRSample/Scripts/Sample/HISPlayerSample.cs and StreamController GameObject in the Editor.
The RenderScreen GameObject is a Quad that displays the video.
To select the rendering mode, go to StreamController GameObject > HISPlayerSample script > MultiStreamProperties > Element 0 > RenderMode. The script automatically enables or disables the required components from the RenderScreen based on your selection.
For detailed setup instructions for each render mode, please refer to RenderModes.
Select one of sample scenes explained below.
This scene demonstrates high-resolution video playback using Material render mode.
This scene demonstrates high-resolution video playback using ExternalSurface render mode.
This scene demonstrates 360° video playback using RenderTexture render mode. The RenderScreen GameObject uses a Sphere as its Mesh Filter and only has a Mesh Renderer. This is the recommended configuration for 360° video.
For information about Ambisonic audio support, please refer to Ambisonic
Please check Assets/OpenXRSample/Scripts/Sample/HISPlayerSample.cs script. The script must inherit from HISPlayerManager. It is necessary to add the 'using HISPlayerAPI;' dependency
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HISPlayerAPI;
public class HISPlayerSample : HISPlayerManager
{
...
}It is necessary to call SetUpPlayer() before calling other APIs. This function initializes everything else that will be needed during the usage of HISPlayer APIs.
Refer to Stereoscopic Video.
For more information about the supported features and APIs, please refer to the following HISPlayer API.









