From cb20dfb18e0e23ad905c11c4e507f6df38177eb5 Mon Sep 17 00:00:00 2001 From: Daniel Matzke Date: Thu, 22 Jan 2026 16:54:34 +0100 Subject: [PATCH 1/4] added code to work around android flicker bug after pause on Mali devices --- .../Plugins/Mediabox/Samples~/GameManager.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Assets/Plugins/Mediabox/Samples~/GameManager.cs b/Assets/Plugins/Mediabox/Samples~/GameManager.cs index 4fa6f7e..6f6cd9c 100644 --- a/Assets/Plugins/Mediabox/Samples~/GameManager.cs +++ b/Assets/Plugins/Mediabox/Samples~/GameManager.cs @@ -9,9 +9,36 @@ namespace Mediabox.Samples { /// Details to this class can be found in the base class. /// public class GameManager : GameManagerBase { + protected override Task OnStartGame(string contentBundleFolderPath, GameDefinition definition, string saveGamePath) { Debug.Log($"[GameManager] Starting Game: {JsonUtility.ToJson(definition)} at contentBundleFolderPath {contentBundleFolderPath} with saveGamePath {saveGamePath}"); return Task.CompletedTask; } + + #if UNITY_ANDROID + + public UniversalRenderPipelineAsset pipelineAsset = null; + + // Android flicker bug resolution: + void OnApplicationPause(bool pauseStatus) { + if (pauseStatus) return; + if (Time.time == 0) return; + if (SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan)return; + // Optional additional restriction. So far we have only seen Adreno chips with the error, + // but a lot of posts about Mali chips having other flickering bugs, we have opted out of + // implementing this restriction in case they are also effected. + // if (!SystemInfo.graphicsDeviceName.ToLower().Contains("adreno")) return; + ReflectionCallReleaseTargets(); + } + + void ReflectionCallReleaseTargets() { + if (pipelineAsset == null) return; + ScriptableRenderer renderer = pipelineAsset.GetRenderer(-1); + if (renderer == null) return; + var methodInfo = typeof(ScriptableRenderer).GetMethod("ReleaseRenderTargets", BindingFlags.Instance | BindingFlags.NonPublic); + methodInfo?.Invoke(renderer, Array.Empty()); + } + #endif } + } \ No newline at end of file From 71c106f0fc727cafc54a3e083bf31d2e838822fb Mon Sep 17 00:00:00 2001 From: Daniel Matzke Date: Thu, 22 Jan 2026 16:59:36 +0100 Subject: [PATCH 2/4] made sure pipelineAsset is always serialized --- Assets/Plugins/Mediabox/Samples~/GameManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Plugins/Mediabox/Samples~/GameManager.cs b/Assets/Plugins/Mediabox/Samples~/GameManager.cs index 6f6cd9c..9c09541 100644 --- a/Assets/Plugins/Mediabox/Samples~/GameManager.cs +++ b/Assets/Plugins/Mediabox/Samples~/GameManager.cs @@ -10,15 +10,16 @@ namespace Mediabox.Samples { /// public class GameManager : GameManagerBase { + protected override Task OnStartGame(string contentBundleFolderPath, GameDefinition definition, string saveGamePath) { Debug.Log($"[GameManager] Starting Game: {JsonUtility.ToJson(definition)} at contentBundleFolderPath {contentBundleFolderPath} with saveGamePath {saveGamePath}"); return Task.CompletedTask; } - #if UNITY_ANDROID - public UniversalRenderPipelineAsset pipelineAsset = null; + #if UNITY_ANDROID + // Android flicker bug resolution: void OnApplicationPause(bool pauseStatus) { if (pauseStatus) return; From ffe756b9e69abb98fa299cb520b1f02cf06ba531 Mon Sep 17 00:00:00 2001 From: Daniel Matzke Date: Thu, 22 Jan 2026 17:00:48 +0100 Subject: [PATCH 3/4] bumped package version --- Assets/Plugins/Mediabox/CHANGELOG.md | 3 ++- Assets/Plugins/Mediabox/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Plugins/Mediabox/CHANGELOG.md b/Assets/Plugins/Mediabox/CHANGELOG.md index 8b62cb9..4067efb 100644 --- a/Assets/Plugins/Mediabox/CHANGELOG.md +++ b/Assets/Plugins/Mediabox/CHANGELOG.md @@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Calendar Versioning](https://calver.org). -## [2026.0122.0] - 2026-01-22 +## [2026.0122.1] - 2026-01-22 ### Added - Workaround for Turkish users (Android export) +- Added code to mitigate Android Flicker bug after pause on Mali chips ## [2023.1127.1] - 2023-11-27 ### Added diff --git a/Assets/Plugins/Mediabox/package.json b/Assets/Plugins/Mediabox/package.json index 70b91ba..68045d6 100644 --- a/Assets/Plugins/Mediabox/package.json +++ b/Assets/Plugins/Mediabox/package.json @@ -1,6 +1,6 @@ { "name": "com.wonderz.wunderbox", - "version": "2026.0122.0", + "version": "2026.0122.1", "displayName": "Wunderbox Unity SDK", "description": "This is the Unity SDK used for WonderZ GmbH's Wunderbox Content Distribution Solution", "unity": "2019.4", From ee5951bca8edb25066e6a10f8e2b7e7fac34d991 Mon Sep 17 00:00:00 2001 From: Daniel Matzke Date: Thu, 22 Jan 2026 18:07:59 +0100 Subject: [PATCH 4/4] updated version number to match semver --- Assets/Plugins/Mediabox/CHANGELOG.md | 2 +- Assets/Plugins/Mediabox/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Plugins/Mediabox/CHANGELOG.md b/Assets/Plugins/Mediabox/CHANGELOG.md index 4067efb..573885b 100644 --- a/Assets/Plugins/Mediabox/CHANGELOG.md +++ b/Assets/Plugins/Mediabox/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Calendar Versioning](https://calver.org). -## [2026.0122.1] - 2026-01-22 +## [2026.122.1] - 2026-01-22 ### Added - Workaround for Turkish users (Android export) - Added code to mitigate Android Flicker bug after pause on Mali chips diff --git a/Assets/Plugins/Mediabox/package.json b/Assets/Plugins/Mediabox/package.json index 68045d6..7684f15 100644 --- a/Assets/Plugins/Mediabox/package.json +++ b/Assets/Plugins/Mediabox/package.json @@ -1,6 +1,6 @@ { "name": "com.wonderz.wunderbox", - "version": "2026.0122.1", + "version": "2026.122.1", "displayName": "Wunderbox Unity SDK", "description": "This is the Unity SDK used for WonderZ GmbH's Wunderbox Content Distribution Solution", "unity": "2019.4",