Skip to content

Commit

Permalink
Gameplay: Fix Video Player being active while advanced graphics is di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
rechyou committed Sep 24, 2024
1 parent 3bb4794 commit 301bd03
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/Scripts/Gameplay/Skin/SkinService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 301bd03

Please sign in to comment.