void Start() { var output = new NativeArray <long>(source.Length, Allocator.Persistent); var job = new SelectJob <AddOne> { Source = source, Selector = ValueFunc <int, long> .New <AddOne>(), Output = output }; job.Run(); Debug.Log($"output: ({string.Join(",", output)})"); output.Dispose(); }
public static ValueFunc <T, T> .Struct <Functions.SelectSelf <T> > SelectSelf <T>() where T : struct => ValueFunc <T, T> .New <Functions.SelectSelf <T> >();