blackears / cyclopsLevelBuilder

A Godot plugin to let you block in levels inside the Godot editor.
MIT License
920 stars 36 forks source link

Bug: tool_prism.gd "Invalid Get Index 'global_transform'" error when trying to use prism tool. #134

Open Snowdrama opened 4 months ago

Snowdrama commented 4 months ago

Really cool project, love having this kind of tool for prototyping. Ran into a bit of an issue trying to use the prism tool. Not 100% sure what's happening(type cast issue? base Node not Node3D maybe?)

Hopefully this helps narrow it down!

What's happening:

When using the Prism tool Godot outputs constant errors about

res://addons/cyclops_level_builder/tools/tool_prism.gd:208 - Invalid get index 'global_transform' (on base: 'Node').

Example Video:

Note that I can use the other tools with no issues just prism has this issue

https://github.com/blackears/cyclopsLevelBuilder/assets/1271916/be9317e4-e531-40fb-bec8-d4a87d56c80e

Version:

v4.2.1.stable.mono.official [b09f793f5]

Steps:

Downloaded the release zip 1.0.2 Copied the addons/cyclops_level_builder folder to the project Added the cyclops_global_scene.tscn named CyclopsAutoload to the Autoload section of the project settings Enabled the plugin in the plugin tab Tried to use the prism tool. Error occurs when moving the mouse Attempting to use the tool seems to work until you attempt to extrude it(See example video)

blackears commented 4 months ago

I'm not sure. There has been a bit of work done on this tool since the last release, though. Do you still get this error if you work from the HEAD?

Tried doing the same on my branch using the development code and am not getting this error.

Snowdrama commented 4 months ago

Hmm not sure, I can try that. I assume by head you mean whatever the current head is so here's what I did, I'm getting some errors during installation in a new empty project.

This gets me some new errors: On installation I get:

res://addons/cyclops_level_builder/cyclops_level_builder.gd:111 - Trying to assign value of type '' to a variable of type 'material_palette_viewport.gd'.

Creating a new scene I get:

res://addons/cyclops_level_builder/cyclops_level_builder.gd:322 - Invalid call. Nonexistent function 'save_state' in base 'Nil'.

And then after creating a block I get:

res://addons/cyclops_level_builder/nodes/cyclops_block.gd:185 - Invalid get index 'display_mode' (on base: 'Nil').

Is there a particular commit I should be looking at? Should It just be off master?

I'm not 100% sure what these errors mean but I can look at the code and see if I can get an idea of what's happening.

blackears commented 3 months ago

I'm not sure why you're getting these errors. I tried adding the files in the compiled archive to an empty project and after setting up the CyclopsAutoload and reloading the project, it worked properly. The error on res://addons/cyclops_level_builder/cyclops_level_builder.gd:111 looks like you didn't download the material_pallette_viewport.tscn file. you might want to do a fresh checkout and work from that. You should also be able to just open the Cyclops project directly and work with it in the Godot editor.

Snowdrama commented 3 months ago

Interesting, sounds like a plan, I'll try that later tonight! Yeah I'm not sure maybe somehow the installation corrupted something. Anyway I'll try doing a fresh checkout and opening the project directly to see what happens, and try some other things. Thanks for the insight.