add UncheckedGetPool

This commit is contained in:
Mikhail 2023-07-02 16:45:40 +08:00
parent aad94da19d
commit 649037577d

View File

@ -104,6 +104,11 @@ namespace DCFApixels.DragonECS
return Get<PoolCache<TPool>>().instance; return Get<PoolCache<TPool>>().instance;
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public TPool UncheckedGetPool<TPool>() where TPool : IEcsPoolImplementation, new()
{
return UncheckedGet<PoolCache<TPool>>().instance;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public TAspect GetAspect<TAspect>() where TAspect : EcsAspect public TAspect GetAspect<TAspect>() where TAspect : EcsAspect
{ {
return Get<AspectCache<TAspect>>().instance; return Get<AspectCache<TAspect>>().instance;