You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
741 B
C#

using LanLib.UpdateManager.Jobs.Internal;
namespace LanLib.UpdateManager.Jobs
{
public struct UpdateJob<TData> : IInternalUpdateJob<TData>
where TData : struct, IUpdateJob
{
public UnsafeNativeList<TData> Data { get; set; }
public unsafe void Execute(int index)
{
Data.ItemRefAt(index).Execute();
}
}
#if HAVE_BURST
[Unity.Burst.BurstCompile]
#endif
public struct BurstUpdateJob<TData> : IInternalUpdateJob<TData>, IInternalBurstUpdateJob
where TData : struct, IUpdateJob
{
public UnsafeNativeList<TData> Data { get; set; }
public unsafe void Execute(int index)
{
Data.ItemRefAt(index).Execute();
}
}
}