Ardot66 / DialogueTrees

A graph-based dialogue system
MIT License
7 stars 2 forks source link

Unable to load addon script from path: 'res://addons/dialogue_trees/scripts/core/DialogueTreesPlugin.cs'. This might be due to a code error in that script. Disabling the addon at 'res://addons/dialogue_trees/plugin.cfg' to prevent further errors. #3

Closed agoodfellow123 closed 3 months ago

agoodfellow123 commented 3 months ago

Hello, I have never used a C# addon, I'm not sure if I'm doing something wrong but I simply installed the addon from godot plugins and tried to enable it from the plugins menu unfortunately I got the "Unable to load addon script from path: 'res://addons/dialogue_trees/scripts/core/DialogueTreesPlugin.cs'. This might be due to a code error in that script. Disabling the addon at 'res://addons/dialogue_trees/plugin.cfg' to prevent further errors." I did this on a empty project so I don't think this is an error on my part. I checked that file and couldn't find any suspects.

Ardot66 commented 3 months ago

This is not an issue with the plugin, I just tested this and there are a few reasons why it can happen.

First, make sure you have a dotnet enabled version of Godot. If you don't, you can't use C#. Second, you'll need to build the C# project whenever you add a new plugin or modify a script. Otherwise Godot won't recognise that scripts were added or changed, and you'll get that error and won't be able to enable the plugin.

agoodfellow123 commented 3 months ago

Thank you for your response, for the last hour I was trying to compile the project, I have found out that it is impossible on linux because of MS BS. I'm gonna install win10 on a virtual machine and give it a go there. I will report back after doing that.

Ardot66 commented 3 months ago

Good luck!

agoodfellow123 commented 3 months ago

Apparently, Windows wasn't necessary, but an MS version of VSCode was. I was using a non-telemetry fork of it so that's why it didn't compile. Unfortunately even after compiling I'm getting the exact same error. It does compile the game runs after pressing debug on VSCode but doesn't let me tick the plugin box.

Ardot66 commented 3 months ago

That's really odd. Could you try sending me the project that isn't working?

agoodfellow123 commented 3 months ago

It is just an empty project with a single empty scene and the addon. I can upload if you want but it is easily reproduceable. Perhaps it is the Godot version that is the problem? I just got the latest .net/mono (4.2.1) from their site. Is that version ok?

If everything is ok with the version I'm clearly doing something wrong.

Ardot66 commented 3 months ago

Just tested with Godot 4.2.1, it's working fine on my end. I'm sorry, but I don't know if I'll be able to help you.