mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 00:32:43 +00:00
fix SetButtonActive NRE
This commit is contained in:
parent
bf5e8a013c
commit
55e2898c97
@ -438,9 +438,13 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart
|
||||
return;
|
||||
}
|
||||
|
||||
var titleAnimationController = QSBWorldSync.GetUnityObject<TitleScreenManager>()._gfxController;
|
||||
var activeAlpha = 1;
|
||||
|
||||
var activeAlpha = titleAnimationController.IsTitleAnimationComplete() ? 1 : 0;
|
||||
if (QSBSceneManager.CurrentScene == OWScene.TitleScreen)
|
||||
{
|
||||
var titleAnimationController = QSBWorldSync.GetUnityObject<TitleScreenManager>()._gfxController;
|
||||
activeAlpha = titleAnimationController.IsTitleAnimationComplete() ? 1 : 0;
|
||||
}
|
||||
|
||||
button.SetActive(active);
|
||||
button.GetComponent<CanvasGroup>().alpha = active ? activeAlpha : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user