public static DynamicBuffer <T> GetSingletonBuffer <T>(this SystemBase sys) where T : unmanaged, IBufferElementData { var ent = sys.GetSingletonEntity <T>(); return(sys.GetBuffer <T>(ent)); }
public static NativeArray <ArrayType> GetSingletonBufferArray <BufferType, ArrayType>(this SystemBase s) where BufferType : unmanaged, IBufferElementData where ArrayType : unmanaged { var e = s.GetSingletonEntity <BufferType>(); return(s.GetBufferArray <BufferType, ArrayType>(e)); }
public UIJobContext(SystemBase sys, bool readOnly = false) : this(sys, sys.GetSingletonEntity <UILogBuffer>(), readOnly) { }
public MapStateJobContext(SystemBase sys, bool readOnly = false) : this(sys, sys.GetSingletonEntity <MapObstaclesBuffer>(), readOnly) { }
public PlayerJobContext(SystemBase system, bool readOnly) { entity = system.GetSingletonEntity <Player>(); posFromEntity = system.GetComponentDataFromEntity <Position>(readOnly); mapViewFromEntity = system.GetBufferFromEntity <MapViewBuffer>(readOnly); }
public static JobHandle GetSingletonASync <T>(this SystemBase system, JobHandle dependency, Allocator allocator, out NativeReference <T> singleton) where T : unmanaged, IComponentData { return(GetComponentASync <T>(system, dependency, allocator, system.GetSingletonEntity <T>(), out singleton)); }