kalysti / terrain-tool-godot4

GODOT 4 3D Terrain Editor (C# Plugin)
MIT License
159 stars 12 forks source link

Cannot enable plugin #22

Closed Itsnotdone closed 1 year ago

Itsnotdone commented 1 year ago

Describe the bug Cannot open TerrainPlugin.cs when enabling the plugin

To Reproduce Steps to reproduce the behavior:

  1. Install plugin from asset lib
  2. Move all files to addons/terrain
  3. Enable plugin in project settings

Expected behavior Enabled plugin

Screenshots image

Desktop (please complete the following information):

Additional context Godot 4 mono and .net 6 are installed

llleeexxxoooppp commented 1 year ago

I've same problem, but in ubuntu on v4.0.beta14.official [28a24639c] build image

Manik2607 commented 1 year ago

same here

UnderhillDev commented 1 year ago

I have encountered the same issue using Beta 14. Mono build, of course. My best guess is that compatibility broke during one of the Godot beta updates. I hope sboron gets it back up and running again

Sythelux commented 1 year ago

Thank you for the Issue. I will take a look immediately.

Sythelux commented 1 year ago

Describe the bug Cannot open TerrainPlugin.cs when enabling the plugin

To Reproduce Steps to reproduce the behavior:

  1. Install plugin from asset lib
  2. Move all files to addons/terrain
  3. Enable plugin in project settings

Expected behavior Enabled plugin

Screenshots image

Desktop (please complete the following information):

  • Windows 10

Additional context Godot 4 mono and .net 6 are installed

the current pull request should fix it in general. However you moved it to another Folder the Fix might not work for you, as it currently explicitly looks for it's own assets in "res://addons/TerrainPlugin/..." It is something I'm working on, but can't guarantee it ever working in the future.

Sythelux commented 1 year ago

If possible please try pull #26 and see if that is working with latest stable.

ascripter commented 1 year ago

The problem is still present for me on Windows 10, Godot 4.1 RC1 after moving the plugin to addons/TerrainPlugin: "Unable to load addon script from path: 'res://addons/TerrainPlugin/TerrainPlugin.cs' This might be due to a code error in that script."

This also happens for the Godot 4.1 fork of Sythelux.

Sythelux commented 1 year ago

I'm sorry I have to ask, but did you went through the correct activation Order?

  1. create a C# Solution
  2. build once with C# enabled
  3. enable the Plugin in the Project settings

Activation-Order

ascripter commented 1 year ago

Didn't know that. But it also fails at the first step: "Failed to create C# project".

Do I need to install a C# compiler? I have absolutely no background in C, C++ or C#, maybe I'm missing some basics.

Sythelux commented 1 year ago

It is not your fault really. It is supposed to go into the wiki/readme/faq which stefan hasn't enabled here and I hadn't hat the time to write one in my repo.

you need the Godot dotnet version for this to work so the second button in this image: grafik

or if you downloaded the 4.1 beta you need to go into the mono subfolder:

for example for Godot 4.1 beta 3 you have to go here: https://downloads.tuxfamily.org/godotengine/4.1/beta3/mono/

you can see that there is a mono folder in each godot engine folder. you need that version for your platform.

lastly you need at least dotnet 6 installed, which you can get from here: https://dotnet.microsoft.com/en-us/download

I know this seems like a lot of work, but there is a benefit on coding in C# it is not as hard as C++, but it is faster than GDScript (although the Godot team did a lot of nice work)

We already had user asking if there will be a port of this addon to C++ (which would make the dotnet download part obsolete) and We don't plan to, but there is a movement of Godot developers themselves to integrate Terrain Tooling into the engine until then I will try to maintain this repository to have a somewhat working alternative.

ascripter commented 1 year ago

Thanks a lot. Building and activating the plugin works now on Godot 4.0.3 as well as 4.1 RC 1.

However I got 73 warnings during building: "The annotation for nullable reference types should only be used in code within a '#nullable' annotations context."

Sythelux commented 1 year ago

okay thank you. I know what the issue there is, but can't fix that soon. If you want you can write an extra Issue about it. I'll leave this one open until the OP writes something or there is no activity for a while.