[英]my workspace setting.json for unity on VSCode says 'end of file' expected after files.exclude
After setting VSCode as my editor and downloading the unity debugger extension, I deleted the original settings.json and replaced it with this one: 将VSCode设置为编辑器并下载统一调试器扩展后,我删除了原始settings.json并将其替换为以下代码:
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.meta": true,
"**/*.*.meta": false,
"**/*.unity": true,
"**/*.unityproj": true,
"**/*.mat": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.tga": true,
"**/*.cubemap": true,
"**/*.prefab": true,
"**/Library": true,
"**/ProjectSettings": true,
"**/Temp": true
}
What i want is for only the CS scripts to show and hide the remaining (.unity,.prefab etc...). 我想要的只是CS脚本显示和隐藏其余(.unity,.prefab等...)。 I found this above code online that's meant to do that but there's an 'end of file expected' message on the colon after the files.exclude.
我在网上找到了上面的代码,这是要这样做的,但是在files.exclude之后,冒号上有一个“文件已结束”消息。 i guess a set of curly brackets is missing somewhere but where in the code is it meant to be?
我猜想在某个地方缺少花括号,但是在代码中这意味着什么呢?
I actually found what was missing and it happened to be that curly brackets also needed to encapsulate the whole code itself. 我实际上发现了所缺少的东西,恰好是大括号也需要封装整个代码本身。 That solved the problem.
那解决了问题。 Here is the corrected code with some extra files to exclude added:
这是经过纠正的代码,其中包含一些要排除的额外文件:
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.meta":true,
"**/Library":true,
"**/obj":true,
"**/Temp":true,
"**/ProjectSettings": true,
"**/*.unityproj": true,
"**/*.wav": true,
"**/*.sln": true,
"**/*.userprefs": true,
"**/*.prefab": true,
"**/*mat": true,
"**/*fbx": true,
"**/*.unity": true
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.