Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Folders and custom files not showing in Visual Studio under assembly definition

Discussion in 'Code Editors & IDEs' started by Executus, May 26, 2022.

  1. Executus

    Executus

    Joined:
    Jan 25, 2020
    Posts:
    1
    I've created a new Unity Package locally which I've added to a new Unity project (2D microgame sample) using the package manager. In my Unity Package I've followed the recommended layout of files and folders and created an Assembly Definition in my Editor folder. My Editor folder contains scripts and subfolders containing more scripts.

    When I open Visual Studio, the assembly definition shows up correctly in Solution Explorer under Assembly-CSharp and Assembly-CSharp-Editor, but there are no subfolders - all files are just in one flat list. The folder hierarchy is completely lost.

    In addition to this, only *.cs and *.dll files show up under my assembly in Visual Studio. I have a number of other text based files that I'd like to edit in Visual Studio - *.json, *.proto, *.cdc etc.

    Under the main unity project (Assembly-CSharp), the folder structure is there but these custom text files also don't appear.

    How do I make these custom text files appear in Visual Studio solution explorer, and how do I make the folder hierarchy appear for my package?