Skip to content

Commit

Permalink
Destroy default camera when using yarground venue (#951)
Browse files Browse the repository at this point in the history
Addressing the fixme
  • Loading branch information
theli-ua authored Jan 27, 2025
1 parent 3951404 commit dec8f5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 5 additions & 1 deletion Assets/Script/Gameplay/BackgroundManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ private async UniTaskVoid Start()
var bgInstance = Instantiate(bg);

bgInstance.GetComponent<BundleBackgroundManager>().Bundle = bundle;

// Destroy the default camera (venue has its own)
Destroy(_videoPlayer.targetCamera.gameObject);

break;
case BackgroundType.Video:
switch (result.Stream)
Expand Down Expand Up @@ -284,4 +288,4 @@ public void Dispose()
Dispose();
}
}
}
}
6 changes: 1 addition & 5 deletions Assets/Script/Venue/BundleBackgroundManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ private void Awake()
{
// Move object out of the way, so its effects don't collide with the tracks
transform.position += Vector3.forward * 10_000f;

// TODO: FIX
// Destroy the default camera (venue has its own)
// Destroy(GameManager.Instance.DefaultCamera.gameObject);
}

private void OnDestroy()
Expand Down Expand Up @@ -122,4 +118,4 @@ public void ExportBackground()
}
#endif
}
}
}

0 comments on commit dec8f5f

Please sign in to comment.