Getting started with HISPlayer consists of implementing the following steps:
-
Import and configure SDKs
1.1. Integrate Meta XR All-in-One SDK
1.2. Import package
1.3. Configure Unity for Android
-
HISPlayer Meta Quest SDK Sample
2.1 Import HISPlayer Meta Quest SDK Sample
Integrate HISPlayer SDK with the Meta XR All-in-One SDK or Meta XR Core SDK only for smaller package size.
First, please configure the Unity project for Oculus by following this Tutorial and open Window > Package Manager > Packages: In Project to check Meta XR All-in-One SDK is installed properly.
Open Edit > Player Settings > MetaXR, select the Android platform and clik "Select All" and "Apply All" in order to set up all the Meta XR settings.
In XR Plug-in Management, please make sure that you have the OpenXR option checked (or Oculus for older Meta XR SDK version). Otherwise, when you run the application, it will show a 2D window without XR environment.
- Edit > Project Settings > XR Plug-in Management
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 Meta Quest 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.
Please, download the sample here: HISPlayer Meta Quest SDK Sample (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 Oculus and HISPlayer SDK. To use the sample, please follow these steps :
- Set up the Meta XR All-in-One environment
- Import HISPlayer SDK
- Import HISPlayer Meta Quest SDK Sample
- Open Assets/HISPlayerMetaQuestSample/Scenes/HISPlayerMetaQuestSDKSample.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/HISPlayerMetaQuestSDKSample/Scripts/Sample/HISPlayerSample.cs and StreamController GameObject in the Editor.
Attach OVROverlay script to RenderScreen Quad GameObject. The video will be rendered on the Quad GameObject.
Set the following OVROverlay properties:
- Overlay Shape: Quad or Equirect (for 360 degree video)
- Is External Surface: True
- External Surface Width: Input the desired width size. You may input the same value as the highest resolution (width) of your stream.
- External Surface Height: Input the desired height size. You may input the same value as the highest resolution (height) of your stream.
- Is Protected Content: True.
In the HISPlayer multistream properties, set the RenderMode as External Surface. Please go to StreamController GameObject > HISPlayerSample script > MultiStreamProperties > RenderMode > External Surface.
Please check Assets/HISPlayerMetaQuestSDKSample/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
{
...
}Next, please refer to the SetUpMetaQuest() function:
- Find OVROverlay component from the GameObject (RenderScreen) that we have created.
- When the external surface object has been created:
- Set the external surface to HISPlayer multistream properties's externalSurface object.
- Call SetUpPlayer() to initialize the player and load the stream.
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.
If you are not playing a DRM protected content, please modify the MultiStreamProperties by unchecking the Enable DRM checkbox to disable DRM and remove all element from Key Server URI list.
To render 360 degree video, you can set the OVROverlay property Overlay Shape to Equirect.
Refer to Stereoscopic Video.
For more information about the supported features and APIs, please refer to the following HISPlayer API.







