Assembly Definition not loading when specifying constraints

Hey,

I am using assembly definitions to load specific debug utilities in editor and development builds. To strip the debug assembly in production builds I am using the assembly definition constraints as shown in this screenshot:

I specified “UNITY_EDITOR || DEVELOPMENT_BUILD” to include this assembly in editor and development builds. Inside the editor everything works fine. The assembly is loaded and the debug utilities are working fine. When I build a development build of the game the assembly appears in the “Managed” folder, but it seems like the assembly is not loaded. When I start the game, the debug utility is not loaded and the logs of the debug utility are also missing in the log file. If I remove the constraints and build again, everything is working fine.

Is this a bug or am I missing something?

It isn’t a bug, the UnityEditor namespace is not included in a build, as there is no editor.

I know this, but that has nothing to do with that problem. I am not using any UnityEditor namespaces. Neither is the debug code inside a editor folder. The assembly definition constraints I put in mean “if UNITY_EDITOR or DEVELOPMENT_BUILD is defined”.

Yeah didn’t look at the problem properly. Not sure why it wouldn’t be loading, you don’t seem to be missing anything.

Take a look at platforms and make sure you are including the right platforms, should be on any by default so it might not be that.

If everything looks good, I would file a bug report than.