Search Unity

Feedback Let disable auto compilation.

Discussion in 'Editor & General Support' started by OlegHCP, Mar 1, 2019.

  1. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    Auto compilation interferes with work sometimes (even often). It would be better to make options to choose: either аuto compiling or compiling by button. And a checkbox (if the second): compile when play pressed.

    PS: please do not advise me to uncheck "Auto refresh" in Preferences. It won't make work process more comfortable.
     
    DungDajHjep likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    What is different between what you want and what the "Auto refresh" check box already provides?
     
  3. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    I want to turn off auto compilation (or to have possibility to do this), I don't want to turn off auto refreshing of all assets, because auto refreshing is very useful option.
    Absurdity of the situation is that Unity sometimes compiles automatically in spite of disabled auto refreshing and doesn't refreshes automatically because of disabled auto refreshing.
    So unchecked "Auto refresh" does not look like good and stable solution, but looks like a necessary evil or a freaky crutch.
     
    DungDajHjep likes this.
  4. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    In no way do I mean to invalidate your request with this response, but while you are waiting for a reply to this I figured you might be interested in a workaround. You can create and manage a C# project outside of Unity. (Keep the C# project in the Unity Project folder (above Assets folder) if you want to keep everything together). And you can configure your project to place the compiled DLL where ever you like. In your case, you can ask it to place the compiled DLL into your Assets folder. So, you get to choose when your scripts are recompiled because you'll be compiling them manually in visual studio.

    Of course, this doesn't work if you use any external scripts/plugins that you do not control, but maybe this suggestion will tie you over until then. We have lots of external scripts and such in our project but we rarely edit them so they aren't culprits behind the recompilations.
     
  5. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    Well... this way is still a crutch and it has some problems (renaming of MonoBehaviour scripts, reinitialisation of custom libraries each time and so on), but thanks for participation.
     
    Last edited: Mar 2, 2019
  6. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Yes not a perfect solution. So regarding your feature request, what do you image the workflow would be like? Would it compiled on play? What about editor scripts? Maybe a compile button becomes visible somewhere if you enable this feature?
     
  7. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    Of Course it should be a UI button + hotkey (or possibility to bind a key combination).

    Concerning editor scripts, I don't think they should be an exception. Editor scripts may be a target of multiple actions too. You can rename, then move to other folder, then delete something, and Unity will recompile after each of these actions and will enrage each time and make life hell.

    I'm afraid I'm not really sure what you mean. If this is about compiling while the editor is in play mode, I don't see any problem. If you don't want to compile while playing just don't push the compile button.
     
  8. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    PS I don't really care for this feature, I am just asking you lots of questions so that when and if someone from Unity stumbles upon this, they have lots of information to go off.
     
  9. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    I guess nobody cares, especially if to keep in mind that all were silent for years about this annoying feature.
     
    yoriban likes this.
  10. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Who knows! Best you can do it offer up the suggestion and provide lots of details. :)
     
  11. fiveampsoftware

    fiveampsoftware

    Joined:
    Feb 9, 2015
    Posts:
    33
  12. DungDajHjep

    DungDajHjep

    Joined:
    Mar 25, 2015
    Posts:
    201
    New:
    Just disabled the refresh database feature in the unity plugin of visual studio, I mistakenly blamed Unity.

    Old:
    I don't know who invented the automatic complie feature while we were typing the code. I think he's crazy.
     
    Last edited: Nov 6, 2022
  13. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    Any news?
     
  14. DungDajHjep

    DungDajHjep

    Joined:
    Mar 25, 2015
    Posts:
    201
    Just disabled the refresh database feature in the unity plugin of visual studio, I mistakenly blamed Unity.
     
  15. OlegHCP

    OlegHCP

    Joined:
    Mar 7, 2017
    Posts:
    47
    It's the least of the problems.