Fix ValueChanged events being called out of order

This commit is contained in:
David Zhao 2019-07-26 19:00:07 +09:00
parent 6f2edaad55
commit 6e09d857fd
1 changed files with 6 additions and 0 deletions

View File

@ -53,7 +53,13 @@ private void load(AudioManager audio)
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
}
protected override void LoadComplete()
{
base.LoadComplete();
// This must be added after the base LoadComplete. The overlay may need to be hidden immediately if its disabled.
State.ValueChanged += onStateChanged;
}