Search Unity

How to hide .meta and .cs.meta files in Visual Studio Code on Windows

Discussion in 'Editor & General Support' started by vinanavy, Oct 22, 2016.

  1. vinanavy

    vinanavy

    Joined:
    May 20, 2016
    Posts:
    1
    I using Visual Studio Code to write code for Unity and I want to hide files .meta and .cs.meta. How does it work?
     
  2. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    vinanavy likes this.
  3. bsgbryan

    bsgbryan

    Joined:
    Nov 27, 2015
    Posts:
    26
    Perhaps because they're only used by Unity and their presence adds no value for a developer?
     
    JanSeib, diliupg, Rocky98a and 5 others like this.
  4. unity_cbZwhJ7k3OIliA

    unity_cbZwhJ7k3OIliA

    Joined:
    Jan 27, 2019
    Posts:
    1
  5. ThePherocity

    ThePherocity

    Joined:
    Jan 11, 2017
    Posts:
    1
    Thanks unity_cbZwhJ7k3OlliA, I prefer answers like yours. Without the snark.
     
    Salient and Astirian like this.
  6. Salient

    Salient

    Joined:
    Jul 19, 2015
    Posts:
    3
    I just started using VS code, so I don't know if this is a recent change or what but if you go to settings there is one more step to opening settings.json. Click this icon in the upper right.

    upload_2020-11-24_11-49-32.png

    then add this
    Code (CSharp):
    1.  "files.exclude": {
    2.          "**/*.meta": true
    3.        }
     
    JumpWire, 2dchaos and arcandio like this.
  7. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    I was wondering the same question, and found a .vscode folder containing a settings.json file as mentioned above.

    I don't remember writing this, so I'm not sure what automatically wrote this, but here's my .vscode/settings.json:

    Code (csharp):
    1. {
    2.     "files.exclude":
    3.     {
    4.         "**/.DS_Store":true,
    5.         "**/.git":true,
    6.         "**/.gitignore":true,
    7.         "**/.gitmodules":true,
    8.         "**/*.booproj":true,
    9.         "**/*.pidb":true,
    10.         "**/*.suo":true,
    11.         "**/*.user":true,
    12.         "**/*.userprefs":true,
    13.         "**/*.unityproj":true,
    14.         "**/*.dll":true,
    15.         "**/*.exe":true,
    16.         "**/*.pdf":true,
    17.         "**/*.mid":true,
    18.         "**/*.midi":true,
    19.         "**/*.wav":true,
    20.         "**/*.gif":true,
    21.         "**/*.ico":true,
    22.         "**/*.jpg":true,
    23.         "**/*.jpeg":true,
    24.         "**/*.png":true,
    25.         "**/*.psd":true,
    26.         "**/*.tga":true,
    27.         "**/*.tif":true,
    28.         "**/*.tiff":true,
    29.         "**/*.3ds":true,
    30.         "**/*.3DS":true,
    31.         "**/*.fbx":true,
    32.         "**/*.FBX":true,
    33.         "**/*.lxo":true,
    34.         "**/*.LXO":true,
    35.         "**/*.ma":true,
    36.         "**/*.MA":true,
    37.         "**/*.obj":true,
    38.         "**/*.OBJ":true,
    39.         "**/*.asset":true,
    40.         "**/*.cubemap":true,
    41.         "**/*.flare":true,
    42.         "**/*.mat":true,
    43.         "**/*.meta":true,
    44.         "**/*.prefab":true,
    45.         "**/*.unity":true,
    46.         "build/":true,
    47.         "Build/":true,
    48.         "Library/":true,
    49.         "library/":true,
    50.         "obj/":true,
    51.         "Obj/":true,
    52.         "ProjectSettings/":true,
    53.         "temp/":true,
    54.         "Temp/":true
    55.     }
    56. }
    If you add/remove from this list, it'll affect VS Code whenever you open the folder that contains this .vscode folder.
     
    arcandio likes this.
  8. jasursadikov

    jasursadikov

    Joined:
    Feb 25, 2020
    Posts:
    17
    Last edited: Oct 10, 2023
    diliupg likes this.
  9. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    Ah late thanks!
    I suppose I could edit the file.. but since I didn't create it, I'll leave it ;) though I do use that syntax in my .gitignores.
     
    jasursadikov likes this.
  10. diliupg

    diliupg

    Joined:
    Jan 23, 2018
    Posts:
    45
    jasursadikov likes this.
  11. jasursadikov

    jasursadikov

    Joined:
    Feb 25, 2020
    Posts:
    17
    Sorry for replying late again :D you can fork it and edit as you wish
     
    ModLunar likes this.
  12. jasursadikov

    jasursadikov

    Joined:
    Feb 25, 2020
    Posts:
    17
    Thank you!