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

9631352--1368413--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.

[quote]
How big of a difference
[/quote]

"Big" in relation to what?


In relation to compile times.

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.


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.

2 Likes