Add ui to uimanager, scriptable object
This commit is contained in:
@@ -12,7 +12,10 @@ namespace BrewMonster.UI
|
||||
|
||||
public GameObject GetPrefabDialog(string id)
|
||||
{
|
||||
return lstPrefabDialog.Find(x => x.id.Equals(id)).prefab;
|
||||
if (string.IsNullOrEmpty(id) || lstPrefabDialog == null)
|
||||
return null;
|
||||
var entry = lstPrefabDialog.Find(x => !string.IsNullOrEmpty(x.id) && x.id.Equals(id));
|
||||
return entry.prefab;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user