UI换了很多,spine主视觉停用
This commit is contained in:
@@ -12,11 +12,16 @@ public static class BgmRuntimeBootstrap
|
||||
private static void Bootstrap()
|
||||
{
|
||||
var mgr = BgmPlaybackManager.EnsureInstance();
|
||||
var controller = SceneObjectLookupCache.FindAny<btmandtopController>();
|
||||
if (controller != null && controller.bgmMixerGroup != null)
|
||||
{
|
||||
mgr.SetOutputMixerGroup(controller.bgmMixerGroup);
|
||||
}
|
||||
mgr.EnsurePlaying();
|
||||
EnsureAudioListener(SceneManager.GetActiveScene());
|
||||
|
||||
// Ensure UI binder exists
|
||||
if (Object.FindAnyObjectByType<BgmUiBinder>() == null)
|
||||
if (SceneObjectLookupCache.FindAny<BgmUiBinder>() == null)
|
||||
{
|
||||
var go = new GameObject("BGM_UI_Binder");
|
||||
go.AddComponent<BgmUiBinder>();
|
||||
@@ -31,6 +36,8 @@ public static class BgmRuntimeBootstrap
|
||||
private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
EnsureAudioListener(scene);
|
||||
var mgr = BgmPlaybackManager.Instance ?? BgmPlaybackManager.EnsureInstance();
|
||||
mgr.EnsurePlaying();
|
||||
RemoveBgmParticlesInLoadedScenes();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user