Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback [1.1.0-exp.1] Request to split data and logic as ISystem and SystemBase

Discussion in 'Graphics for ECS' started by optimise, Oct 9, 2023.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,109
    Case IN-56966

    Currently entities graphics performance is really slow at mobile platform. I would like official to split logic as ISystem and SystemBase that move all the data and logic to ISystem as much as possible to burst them and then create only 1 SystemBase as last system to feed the final data that is processed by ISystems previously to graphics api that is not burst compatible since currently a lot of data and logic at SystemBase are not burst that cause main thread performance really bad. I believe this will significantly improve performance. Another issue is seems like jobs are not evenly distribute and makes a lot gap that makes main thread spends a lot of time for nothing. The screenshot below is profile from Mi 9T Pro (Snagdragon 855) android phone. Official can check case IN-56966 for repro project.

     
    Last edited: Oct 10, 2023
  2. DaxodeUnity

    DaxodeUnity

    Unity Technologies

    Joined:
    Aug 5, 2021
    Posts:
    27
    Currently not on the roadmap, but we've recently made changes in the upcomming update that steer us towards this goal, by using InstanceIDs to keep an unmanaged reference to UnityEngine.Objects stored in RenderMeshArray. In fact, RenderMeshArray itself is mainly used as an interim for allocating IDs that the batch renderer can use, bursted.

    Ideally I think someday we can get to a point where you can fully burst everything in EntitiesGraphics that isn't directly a UnityEngine.Mesh/UnityEngine.Material API. But it isn't something we're directly working on currently, so don't put your bet there just yet.

    If you really want performance today, you could try the batchrenderer yourself. That's actually what powers EntitiesGraphics, so you could write a system that disables existing graphics and roll your own.
    https://docs.unity3d.com/Manual/batch-renderer-group-getting-started.html
     
    Last edited: Oct 10, 2023
    optimise and Harry-Wells like this.
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,109
    Thanks for reply. Unfortunately I dun have resource to roll own custom solution. I hope official can prioritize this feature request and hopefully work on it as early as possible next year.