using System; using System.Collections.Generic; using UnityEngine; namespace Utils { [Serializable] public class GameObjectEntry { public string key; public GameObject value; } public static class GameObjectEntryListExtensions { public static GameObject ByKey(this List entries, string key) { foreach (var entry in entries) { if (entry.key == key) return entry.value; } return null; } } }