Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions rendermodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private IEnumerator SetUpExternalSurface()
int maxAttempts = 10;
int attempts = 0;

SetExternalSurfaceSize(1, 1);
SetExternalSurfaceSize(renderScreen, 1, 1);

while (surfacePtr == IntPtr.Zero && attempts < maxAttempts)
{
Expand All @@ -60,13 +60,17 @@ private IEnumerator SetUpExternalSurface()
SetUpPlayer();
}

private void SetExternalSurfaceSize(int width, int height)
private void SetExternalSurfaceSize(GameObject renderScreen, int width, int height)
{
TexturesExtension sourceTexturesComponent = renderScreen.GetComponent<TexturesExtension>();
if (sourceTexturesComponent != null)
{
sourceTexturesComponent.Resolution = new Vector2(width, height);
}
else
{
Debug.LogError("[Error] TexturesExtension component is not attached.");
}
}
```

Expand All @@ -92,7 +96,7 @@ protected override void EventVideoSizeChange(HISPlayerEventInfo eventInfo)
int width = (int)eventInfo.param1;
int height = (int)eventInfo.param2;

SetExternalSurfaceSize(width, height);
SetExternalSurfaceSize(renderScreen, width, height);
}
}
```
Expand Down
10 changes: 5 additions & 5 deletions setup-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Alternatively, you may set the Target API level to 34 or higher in the Unity pro

## 2.1 Import HISPlayer AndroidXR Sample

Please, download the sample here: [**AndroidXRSample**](https://downloads.hisplayer.com/Unity/XR/HISPlayer_AndroidXR_Sample_1.0.2.unitypackage) (no need to download it if you have received it in the email).
Please, download the sample here: [**AndroidXRSample**](https://downloads.hisplayer.com/Unity/XR/HISPlayer_AndroidXR_Sample_1.0.3.unitypackage) (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
Expand Down Expand Up @@ -158,14 +158,14 @@ For detailed setup instructions for each render mode, please refer to [**RenderM

Select one of sample scenes explained below.

#### HEVC_8K Scene

This scene demonstrates high-resolution video playback using **Material** render mode.

#### HEVC_8K Composition Layer Scene

This scene demonstrates high-resolution video playback using **ExternalSurface** render mode.

#### HEVC_8K Render Texture Scene

This scene demonstrates high-resolution video playback using **Render Texture** render mode.

#### 360° Scene

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.
Expand Down