class EcsComponentPool : IEcsComponentPool where T : class, new () { public static readonly EcsComponentPool Instance = new EcsComponentPool (); private Func _factory; public void MapFactory(Func factory) { _factory = factory; } public int GetIndex () { ... всякая мишура ... T item; if(_factory != null) { item = _factory(); } else { item = new T(); } Items[_itemsCount++] = item; return id; } } ... public class SomeInitializeSystem { public void Initialize() { EcsComponentPool.Instance.MapFactory(() => new MySuperComponent()); } }