Search Unity

Question How big of a difference does excluding platforms make when making assemblies?

Discussion in 'Code Editors & IDEs' started by billygamesinc, Feb 8, 2024.

  1. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    326
    upload_2024-2-8_7-20-39.png

    I usually only check editor since that's all it takes to get it to work for testing.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,937
    "Big" in relation to what?


     
  3. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    326
    In relation to compile times.
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,904
    You understand what the setting does right? It denotes whether or not the assembly will be compiled for a particular target platform.

    There will only be a difference if you change to a target platform that isn't selected. But if you have it set for all platforms, it will always be compiled/included in the project.

    Assemblies have a negligible impact on domain reloads anyway.
     
  5. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,937
    None.

    When working in the editor all code that is either "any platform" or "editor" gets compiled. The other platform boxes are only considered when making builds and do not affect your workflow.

    Actually, if you write editor scripts, you have to put them in an editor assembly anyway unless you want to #if UNITY_EDITOR a whole lot of code.

    And I'm not sure about your double-negation actually. I've never used it in that way. This would mean you have an assembly whose code is only available in editor playmode, but not in builds. Unless this assembly is only for editor scripts? Well, give it a try, make a build, see if that fails. ;)

    Normally for editor scripts assemblies you would uncheck "any platform" and deselect all, which makes the platforms change from exclude to include. Then only check the editor platform box to specifically make an editor assembly.
     
    billygamesinc and spiney199 like this.