Packages, Assembly definition will not be compiled, because it has no scripts associated with it

Hi,

I created a custom package and I noticed that I get the error ‘asmdef will not be compiled, because it has no scripts associated with it.’ if I have my script in a subfolder of the folder that contains the asmdef file.

CustomPackage
–Editor
----assembly.asmdef
----SubFolder
------script.cs

It is fixed if I have my script in the same folder as the asmdef file

CustomPackage
–Editor
----assembly.asmdef
----script.cs

For large packages that would be inconvenient.
asmdef files in the main Assets folder don’t act similarly and include scripts in subfolders as it should.

Edit:

I am using Unity 2020.2.1f1

Thanks for advance.

Right Click-> Reimport fixed the problem!

7 Likes