#Unable to create "new item" in MGCB editor

13 messages · Page 1 of 1 (latest)

opaque pine
#

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.

charred river
# opaque pine Whenever I try to create a "new item" in the MGCB editor, it doesn't show any ty...

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

  1. Copy/paste the .config/dotnet-tools.json file from your game project to here
  2. 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
rigid atlas
#

"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.

charred river
#

I fixed the command

opaque pine
# charred river If no file types are listed, this means the editor isn't loading the dll assembl...

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)

charred river
# opaque pine This is the `.config/dotnet-tools.json` file ```json { "version": 1, "isRoot...

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.

  1. Remove the global tool, run the following in a terminal.
dotnet tool uninstall dotnet-mgcb-editor -g
  1. 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

opaque pine
charred river
#

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

opaque pine
charred river
opaque pine
#

Should I create a new thread for the other problem I was having?