Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Does using many assemblies break projects? (Screenshot attached)

Discussion in 'Code Editors & IDEs' started by billygamesinc, Jan 24, 2024.

  1. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    321
    upload_2024-1-24_1-1-31.png

    I recently refactored my project and split them up into many assemblies and it worked fine until it randomly doesnt. I'm not sure what causes it but it suddenly breaks and Unity classes stop working and my project classes no longer recognize each other. Heres an example of the setup for my assembly the asterisk represents the assembly and the indent represents its child assemblies.

    I fixed this once by deleting the assemblies, reopening the project, see if it works then restore the assemblies from recycle bin. I would like to know what the cause of this is and how to actually fix it when this happens.

    *Player Related Scripts
    *Player Controller
    *Player Weapons
    *Weapons Audio And Visual
    *Damage Handling
    *Player HUD
    *TextMeshPro

     
    Last edited: Jan 24, 2024
  2. billygamesinc

    billygamesinc

    Joined:
    Dec 5, 2020
    Posts:
    321
    Fixed(?)
    I created a folder called PlayerMaster and moved the PlayerMaster to that folder. Based on this, the child assemblies must be in a seperate folder than the parent.
     
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,786
    Yes, you can only have one .asmdef per folder if that's what you ran into.
     
    billygamesinc likes this.