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 [Feature Request] Lock .cs files

Discussion in '2020.2 Beta' started by Guedez, Aug 18, 2020.

  1. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    First off sorry if this is not the right place for requesting new editor features, but I can't think of other better place for it.

    TLDL: A simple button in the Project window that does the equivalent of sending all .cs files in said folder into a 'pseudo' package to remove it form the compilation. Clicking it again 'sends it back' to the asset folder so it can be modified again.

    I am under the impression that packages do not get recompiled every time you change a single you change anywhere else in your code. This gives me the idea of placing all of the 'not in constant change' parts of my code into the packages folder, but then visual studio can't find references there, and some other limitations, even 'go to definition' to a class in the packages folder links to a compiled assembly of said class instead of the source. So What I am asking is a button in the Project window that 'do the equivalent of moving the .cs files in said folder to the packages folder' and back when clicked again. Of course the actual implementation could be different, like having it's own 'packages-like' folder for sent project files.
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    Something very similar to that would be to just use Assembly Definition files to decouple independent parts of your code, this way only assemblies with changes gets recompiled.
     
    phobos2077, Guedez and JoNax97 like this.
  3. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Man, I really wanted to use that, but it always increases my compilation time instead. I don't know if I am using it wrong or what, but I never managed to decrease compilation times using it, not to mention the whole 'you need to move all your editor script folders to another assembly now, even asset store stuff' part of it.
     
  4. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    If it is increasing compilation time, it is probably a bug and should be reported. I use it on most of my projects and so far so good here.
     
    phobos2077 and Peter77 like this.