From 3263b14cc89f720a65c812106e604242e4aae66b Mon Sep 17 00:00:00 2001 From: Yaakov Schlachter <contact@cgprograms.com> Date: Thu, 19 Dec 2024 19:35:21 -0500 Subject: [PATCH 1/2] Fix: properly set initial slider state if `defaultStreamMode` This is a quick and dirty fix that just calls the code that _should_ be getting called by SetPlayerMode. Didn't have time to look into why it doesn't. --- Assets/USharpVideo/Scripts/USharpVideoPlayer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs b/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs index e029779..78256d3 100644 --- a/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs +++ b/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs @@ -176,6 +176,9 @@ private void Start() { SetPlayerMode(PLAYER_MODE_AVPRO); _nextPlaylistIndex = 0; // SetPlayerMode sets this to -1, but we want to be able to keep it intact so reset to 0 + + var syncController = GetComponentInChildren<SyncModeController>(); + syncController.SetStreamVisual(); } _shuffleSeed = Random.Range(0, 10000); From 2c161c65e6b404a981c2ae13c488bad3f77707ff Mon Sep 17 00:00:00 2001 From: Yaakov Schlachter <contact@cgprograms.com> Date: Sat, 25 Jan 2025 14:55:24 -0500 Subject: [PATCH 2/2] Update fix to handle multiple control interfaces --- Assets/USharpVideo/Scripts/USharpVideoPlayer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs b/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs index 78256d3..8654f3e 100644 --- a/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs +++ b/Assets/USharpVideo/Scripts/USharpVideoPlayer.cs @@ -177,8 +177,9 @@ private void Start() SetPlayerMode(PLAYER_MODE_AVPRO); _nextPlaylistIndex = 0; // SetPlayerMode sets this to -1, but we want to be able to keep it intact so reset to 0 - var syncController = GetComponentInChildren<SyncModeController>(); - syncController.SetStreamVisual(); + foreach (var syncController in GetComponentsInChildren<SyncModeController>()) { + syncController.SetStreamVisual(); + } } _shuffleSeed = Random.Range(0, 10000);