Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Sibling Index frame after creation #2

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions PickTimer/Network/LobbyMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ private void Awake()
instance = this;

InitializeLobbyTimerUi();
}

private void Start()
{
GameHook.instance.RegisterHooks(this);
}

Expand Down Expand Up @@ -85,6 +89,7 @@ private static void InitializeLobbyTimerUi()

_lobbyTimerUi = Instantiate(AssetManager.TimerLobbyUI, LobbyTimerCanvas.transform, true);
_lobbyTimerUi.AddComponent<BringBgToTop>();
PickTimer.Instance.ExecuteAfterFrames(1, () => _lobbyTimerUi.transform.SetAsLastSibling());

_lobbyTimerText = _lobbyTimerUi.GetComponentInChildren<TextMeshProUGUI>();
_lobbyTimerText.text = PickTimer.PickTimerTime.ToString();
Expand Down