diff --git a/Assets/Scripts/Gameplay/Skin/SkinService.cs b/Assets/Scripts/Gameplay/Skin/SkinService.cs index 67a6c135..5cdc1d5f 100644 --- a/Assets/Scripts/Gameplay/Skin/SkinService.cs +++ b/Assets/Scripts/Gameplay/Skin/SkinService.cs @@ -374,10 +374,11 @@ public void ApplyRedArcValue(int color, float value) public void SetVideoBackground(string path, bool isUri) { - videoBackground.enabled = !string.IsNullOrEmpty(path); - videoBackgroundRenderer.enabled = !string.IsNullOrEmpty(path) && !Settings.DisableAdvancedGraphics.Value; + bool enabled = !string.IsNullOrEmpty(path) && !Settings.DisableAdvancedGraphics.Value; + videoBackground.enabled = enabled; + videoBackgroundRenderer.enabled = enabled; - if (!string.IsNullOrEmpty(path)) + if (enabled) { path = isUri ? Uri.EscapeUriString(path.Replace("\\", "/")) : path.Replace("\\", "/"); videoBackground.url = isUri ? path : "file://" + path;