private void Awake() { // The InGameHUD enables a frame after the player spawns. // To prevent issues, a dummy mobileInterface is used until // the real one is found in the scene mobileUI = new MobileUIStandIn(); StartCoroutine(LocateInterface()); }
private IEnumerator LocateInterface() { while (true) { var realMobileInterface = FindObjectOfType <MobileUI>(); if (realMobileInterface) { mobileUI = realMobileInterface; break; } yield return(null); } }
public MainUI(IMobileUI mobileUI) { InitializeComponent(); uI = mobileUI; }
public MenuUI(IMobileUI uI) { InitializeComponent(); this.uI = uI; CreateMenu(); }