Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Potential lack of support for future C# because of code regenerate instead of Complement

Discussion in 'DOTS Dev Blitz Day 2022 - Q&A' started by JesOb, Dec 8, 2022.

  1. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Hi

    ISystem and IJobEntity both try to regenerate user code and promote using SystemAPI but it buggy and looks like it will always be buggy because it work on top of SyntaxTree.

    So each time new C# will be released we will be banned from using it because Entities code Regeneration will fail on it.

    Do unity have plans to create more robust API for entities where Code Generation Complement User code instead of trying to rewrite it?

    Do Unity have plans to support custom asset store code generator for ISystems and friends?
    Do Unity have plans to support Aspects outside of code ReGeneration context?
     
  2. DaxodeUnity

    DaxodeUnity

    Unity Technologies

    Joined:
    Aug 5, 2021
    Posts:
    27
    Ayo, could you show the bugs of which you speak? We would be happy to take a look at em :3
    The ones I'm currently aware are related to 1. Places where SystemAPI is not supported, so non-systems and static functions (which we added a compile error for, comming soon) 2. Preservation of Directives like #if and #region. No fix yet, but we're looking into it

    New C# versions in Unity are mainly limited by the Scripting team, not dots. Once they support it we should too. That also includes Roslyn who, when they make new syntaxnodes, don't remove the existing ones we rely upon. So new features are always supported unless they include some very weird asotaric syntax, which they likely wouldn't add anyways.

    That said, we're looking into ways to do more additive changes than rewrites. But no promises, it's not part of our goals. Our goal is to make it both easy to write and performant. This includes iteration time. Which is our current main aim now.

    > Do Unity have plans to support custom asset store code generator for ISystems and friends?
    Bootstrapping the ISystem generator is definitely an interesting idea, but no plans have been made. This is something i have personally been thinking about tho. But no goal of our team right now.

    > Do Unity have plans to support Aspects outside of code ReGeneration context?
    Could you mention the kind of stuff you wanna do with that? Currently we have MyAspect.TypeHandle, MyAspect.Lookup and MyAspect.ResolvedChunk. Which all can be used as a way to retrieve the aspect. Would you want more than that? Happy to hear your thoughts! :3
     
    Last edited: Dec 13, 2022
    Greexonn likes this.