Example #1
0
    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();
    }
Example #2
0
 public static ValueFunc <T, T> .Struct <Functions.SelectSelf <T> > SelectSelf <T>() where T : struct =>
 ValueFunc <T, T> .New <Functions.SelectSelf <T> >();