Whenever I try to create a "new item" in the MGCB editor, it doesn't show any type for me to pick, which makes it impossible to create a new file within the editor. I'm able to add existing ones fine. This might or might not be related, but it also spams "MGCB Editor wants to access your Documents folder" whenever I open it.
#Unable to create "new item" in MGCB editor
13 messages · Page 1 of 1 (latest)
If no file types are listed, this means the editor isn't loading the dll assembly for the content.
The only reason I can think of why this would happen is if you don't have all of the tools in your project.
Can you do the following
- Copy/paste the
.config/dotnet-tools.jsonfile from your game project to here - Run the following command in a terminal window and screenshot or copy/paste the results (you can blank out usernames if you want to, just need to see the outputs)
dotnet tool list -g
"MGCB Editor wants to access your Documents folder" is a standard security feature of MacOS. If your project is in the documents folder. then the editor will need access to open files etc.
@charred river installing the tools globally (using -g) can cause problems unfortunately.
Oh i typed the wrong command lol
I was asking them to list the global installed tools so I could verify if they did it globally or not
I fixed the command
This is the .config/dotnet-tools.json file
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.3",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.3",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.3",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.3",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.3",
"commands": [
"mgcb-editor-mac"
]
}
}
}
and dotnet tool list -g returns this
Package Id Version Commands
------------------------------------------------
dotnet-mgcb-editor 3.8.3 mgcb-editor
Also, on a completely unrelated note, I tried integrating my project with Git and now it returns this error whenever I try running the project
Failed to open file music. Ensure the file is a valid audio file and is not DRM protected.
I checked the path (it exists), the permissions on the file (chmod 777 does nothing), and the permissions on ffmpeg (chmod 777 still does nothing)
Not sure about the git file upload issue but the tool issue is because you have the editor installed as a global tool, so when you launch it, it's defaulting to that one and not the intended local one in the project directory.
- Remove the global tool, run the following in a terminal.
dotnet tool uninstall dotnet-mgcb-editor -g
- Then with a terminal in your project directory (with the .csproj) run
dotnet tool restore
This will ensure the local tools are good to go. After this, you should be good with the MGCB Editor
Nope, it still doesn't work even though it seems to be installed locally. I tried uninstalling and reinstalling it a second time and it still didn't work (the second time I removed the -g option and used dotnet tool install dotnet-mgcb-editor)
if you run dotnet tool list -g and see any of the mgcb stuff in there, it needs to be uninstalled as global.
With the .config/dotnet-tools.json manfiest file in the project, you shouldn't need to manually do a dotnet tool install of any of the tools, just a dotnet tool restore which reads that manifest file to know which tools to restore/install.
You can try clearing your NuGet cache, something funky may have happened when the tool was installed as global. The command would be dotnet nuget locals all --clear. This just cleans out the NuGet cache it is a safe command to run, but it does mean you will need to do a dotnet restore on your projects so they can restore the NuGets to the cache
Nope. I have no idea what's going on.
Not sure then sorry. Those are the only recommendation I can think of
Should I create a new thread for the other problem I was having?