Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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

Discussion in 'Package Manager' started by Stranger-Games, Jan 1, 2021.

  1. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    392
    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.
     
  2. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    392
    Right Click-> Reimport fixed the problem!