private void RegisterUIPrefabs() { for (int i = 0; i < _uiPrefabs.Count; i++) { UIObject uiObject = UIManager.Instance.CreateNewUIObject(_uiPrefabs[i].UIPrefabId, _uiPrefabs[i].LayerID); if (uiObject == null) { CustomLogger.Error(this.name, $"Could not retrieve ui object with id {_uiPrefabs[i].UIPrefabId}"); continue; } uiObject.Initialize(); uiObject.Display(); } }