Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

net core standard new features and ECS/job

Discussion in 'Entity Component System and C# Job system' started by lobotomista, Nov 8, 2018.

  1. lobotomista

    lobotomista

    Joined:
    Jul 21, 2018
    Posts:
    1
    So reading on the new net core features, the span<t> type sounds a lot like the data management used in ECS. Is this gonna be able to be used in conjunction wit ECS?
     
  2. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    75
    Currently, burst does not support Span<T> but we might be able to provide a partial support for it in a future release (can't tell when this will happen exactly)

    A few notes:

    Span<T> can work with managed arrays while we cannot support this with burst.
    Span<T> is a stack only type while native containers in Unity can be passed to jobs so it is serving a different purpose. Mostly to abstract working on a slice of array of data whether it is coming from the stack, managed or unmanaged memory.
    But a nice feature of Span<T> is to safely wrap a stackalloc without unsafe code. That would be probably one interesting part of Span<T> for burst jobs. Another would be to be able to interact with a 3rd party .NET library accepting Span in its API.
     
    lobotomista likes this.
  3. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    373
    @xoofx Alex, any progress on CoreCLR port since the spinning cube?
     
  4. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    75