Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback on "assembly definition files"

Discussion in '2017.2 Beta' started by liortal, Jul 8, 2017.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I like the direction we're heading with this. This change is long overdue, but i'm still happy to see it happen.

    so why invent a new mechanism for defining what files belong to which assembly (C# project files) and the dependencies between these assemblies (C# solution files) ??

    The easiest way would've been to allow us to specify our own solution. Unity would compile that solution when returning to the editor from another window. Solutions and C# projects already have the nice property of knowing whether they should recompile or not, so everything you're offering here should still work.

    Seems like a cumbersome solution that already exists to this problem.
     
  2. Foriero

    Foriero

    Joined:
    Jan 24, 2012
    Posts:
    584
    Just a question. Is file approach better than to have all information about compilation stored in .meta of specific directory? and have nice IMGUI for that part? How does new system handles subdirectories? Do I have to specify in each subdirectory that file?
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
  4. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    Haven't tried it yet, but after reading the docs I'm also thinking it would be great to just have a way to override the assembly target for each folder through a nice UI. Is there any particular reason why we have to create json files instead?
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    It seems it's just not ready yet, as LeonhardP said in this post:
     
  6. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    I assume you are referring to .csproj and .sln files here, e.g. building the Unity project with msbuild.

    The reason we did not take this approach, is because it would not be backwards compatible with how compilation current works in Unity. You would have to add the files to the .csproj every time you add a new script file, which is very different from how scripts are compiled today.

    The long term goal for compilation of scripts in Unity is to provide an API that allows you to decide how the scripts are compiled, which would allow you to invoke msbuild, if you so desire.

    An inspector for the assembly definition files will land before 2017.2 is released.
     
    liortal likes this.
  7. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051