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