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