Search Unity

Resolved Make Transform access fully burst compatible

Discussion in 'Scripting Dev Blitz Day 2023 - Q&A' started by optimise, Feb 23, 2023.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Currently it's still not possible to write fully bursted ISystem to access Transform yet since EntityQuery.GetTransformAccessArray() API can't burst compile because of there's managed class type data. Currently it's using indirect way to make it able to support it at bursted job. Any plan to improve this to make it fully burst compatible?
     
  2. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    Asking our friends from Entities to see if there is any plan about this.
     
  3. kevinmv

    kevinmv

    Unity Technologies

    Joined:
    Nov 15, 2018
    Posts:
    51
    Hey hey!

    We don't have a direct plan to take on this work but we do intend to remove as many barriers to allowing ECS code to be bursted so it would certainly fall under that. It gets a bit complicated due to the GameObject wrapper for Transform data so there isn't a quick fix to make, but it's something we would like to solve, I just can't provide a timeline at the moment.

    In general Hybrid Entities and GameObject code can't be bursted and requires some non-burstable fetching of data from managed types, and then passing unmanaged data into a more computationally heavy codepath that can be bursted. In this case I think we can help out but it'll need some more investigation. While it might not be applicable in this case (as I think you're dealing with GameoObjects specifically), if you use the Unity.Transforms package for transform data, there is no burst restriction.
     
    optimise likes this.
  4. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    The main reason I asking this is because of SystemBase is still too slow. If official can try to optimize SystemBase performance near to ISystem as much as possible, I think somehow can mitigate this issue and also greatly improve performance for the scenario that need to use a lot of SystemBase like updating UI since ugui and ui toolkit for runtime ui APIs are not burst compatible yet.