MASSHUU12 / godot-yat

YAT is an plugin that provides a customizable, in-game terminal for your Godot (C#) project.
https://godotengine.org/asset-library/asset/2324
MIT License
139 stars 6 forks source link

Unable to enable plugin #315

Closed dkaszews closed 3 months ago

dkaszews commented 3 months ago

Describe the bug

When trying to enable plugin, I get a popup with the following error:

Unable to load addon script from path: 'res://addons/yat/Plugin.cs'. This might be due to a code error in that script. Disabling the addon at 'res://addons/yat/plugin.cfg' to prevent further errors.

Steps to reproduce

  1. Import YAT via AssetLib
  2. Try to enable plugin in Project Settings
  3. An error is thrown

Expected behavior

  1. Plugin should be enabled successfully

Additional information

Screenshots

No response

Additional context

No response

MASSHUU12 commented 3 months ago

From the steps to reproduce, I see that you did not mention compiling the project. Did you follow instructions in the USAGE.md file? It's important to create a C# solution first, compile the project, and then you can activate the plugin.

dkaszews commented 3 months ago

By "compile", do you mean exporting the project as executable? Sorry but I am completely new to Godot.

I missed those instructions before, but they don't seem to help:

  1. Create empty project
  2. Add C# solution
  3. Edit *.csproj as in usage.md
  4. Export project
  5. Import YAT via AssetLib
  6. Try to enable plugin in Project Settings
  7. An error is thrown

I have noticed the following error in MSBuild tab:

CS0103: The name 'EditorInterface' does not exist in the current context C:\Users\dkaszews\code\Godot\First Game\addons\yat\src\update\UpdaterWindow.cs(108,9)

MASSHUU12 commented 3 months ago

Alright, now I am a little lost. Can you watch this quick video and tell me if you do something differently, or the same and there are still errors?

By "compile" I mean using dotnet build or clicking the hammer icon in the editor in the upper right corner, but since you are getting an error with MSBuild, you did it. At this point, the only thing I can think of is some bug in .csproj, or it's an old bug that hasn't gone away.

https://github.com/user-attachments/assets/63c104e3-f4a2-4d52-a759-8474d721eb0e

dkaszews commented 3 months ago

Thank you for the video, that cleared everything up!

There was something broken with my dotnet installation, as trying to follow those steps resulted in "Failed to create C# project" and "Unable to find .NET SDK". Reinstalling dotnet and rebooting system helped the issue.