Clean : Wwise script
This commit is contained in:
@@ -115,13 +115,10 @@ public sealed class PersistentWwiseFadeInPlayer : MonoBehaviour
|
||||
OctoSceneFade fade =
|
||||
root.GetComponentInChildren<OctoSceneFade>(true);
|
||||
|
||||
if (fade != null)
|
||||
return fade;
|
||||
if (fade != null) return fade;
|
||||
}
|
||||
}
|
||||
|
||||
// Essential when OctoSceneFade is itself persistent
|
||||
// or not contained in the newly loaded scene.
|
||||
return OctoSceneFade.Instance;
|
||||
}
|
||||
|
||||
@@ -146,16 +143,7 @@ public sealed class PersistentWwiseFadeInPlayer : MonoBehaviour
|
||||
|
||||
private void OnFadeIn()
|
||||
{
|
||||
if (_fadeInEvent == null)
|
||||
{
|
||||
Debug.LogWarning(
|
||||
$"[{nameof(PersistentWwiseFadeInPlayer)}] " +
|
||||
"No Wwise Event assigned.",
|
||||
this
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
if (_fadeInEvent == null) return;
|
||||
|
||||
_fadeInEvent.Post(gameObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user