Search Unity

In visual studio in the Solution Explorer , why I can't see some of the folders ?

Discussion in 'Scripting' started by Chocolade, Jan 25, 2018.

  1. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    On the hard disk I see all the folders and they are exist:



    Audio,Prefabs,Scripts they are all under the folder FirstPersonCharacter

    This three folders also exist in the editor in the Project:



    But in the visual studio in the solution explorer this three folders are not exist.
    I tried to refresh I tried to close and open the visual studio again, nothing helped.



    No folders under FirstPersonCharacter
    And if I'm trying to create new folder in the solution explorer under FirstPersonCharacter with the name Scripts I'm getting message it's already exist.
     
    lameduck likes this.
  2. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    It only shows the files and folders that are included in your project by default. At the top of the solution explorer panel there should be a button that says "Show All Files" which will allow you to select grayed-out ones that exist but aren't included yet, right click them, and say "Include in Project".

    If this is happening with Visual Studio when it's linked to a Unity project, that's pretty odd though- it should automatically include them. You may want to go into Unity's Edit - > Preferences -> External Tools and make sure the editor is attached, and that it's pointing to the right default IDE. You also may need to open the project by using Assets -> Open C# Project or by double clicking files, instead of opening VS manually.
     
    Last edited: Jan 25, 2018
    Bunny83, lesarch, Zagule and 6 others like this.
  3. lc84529232

    lc84529232

    Joined:
    Sep 22, 2019
    Posts:
    4

    Thanks you so much!!!! these solutions works for me
     
  4. Hathakas

    Hathakas

    Joined:
    Jun 10, 2014
    Posts:
    6

    Thank you!! Fixed it for me
     
  5. Zagule

    Zagule

    Joined:
    Aug 23, 2016
    Posts:
    4
    The Assets -> Open C# Project trick finally caused Unity to create an .sln file in the project folder. Thanks!
     
    perza likes this.
  6. perza

    perza

    Joined:
    Jun 30, 2013
    Posts:
    7
    Same here!
     
  7. albertputinjobs

    albertputinjobs

    Joined:
    Jan 10, 2021
    Posts:
    8
    For people looking for answers on newer versions of Unity you may have to build your C# project.

    First install windows build also in unity hub then select target platform to windows. and now you can see visual studio solution checkbox.

    To do this go into File > Build Settings then select the option Create Visual Studio Solution. Then build that and your file explorer will ask you for which folder you want your visual studio solution to be placed into. Then Visual Studio should behave correctly.