AutoGrid icon indicating copy to clipboard operation
AutoGrid copied to clipboard

Installation doesn't work

Open redlemonsydney opened this issue 1 year ago • 12 comments

No matter what project I add the addon/autogrid folder to, it won't let me enable the plugin, stating:

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

It finds an error in every script in the AutoGrid folder:

  • in all files except core, it only finds 2 errors, both of which are solved by removing "tool" at the top of the script (this is also 2 of the errors in core)
  • in core, it finds 10 errors. 2 are the same as the above, 6 of them seem to be about "yield" being removed from godot 4, and the last 2 seem two (lines 10 and 21) seem to only have the use of "setget" in common, so maybe that's causing it?

Here's the core.gd error messages:

Line 1:Unexpected "Identifier" in class body.
Line 2:Unexpected "extends" in class body.
Line 10:Expected end of statement after variable declaration, found "Identifier" instead.
Line 21:Expected end of statement after variable declaration, found "Identifier" instead.
Line 146:"yield" was removed in Godot 4. Use "await" instead.
Line 146:Expected statement, found "(" instead.
Line 157:"yield" was removed in Godot 4. Use "await" instead.
Line 157:Expected statement, found "(" instead.
Line 1261:"yield" was removed in Godot 4. Use "await" instead.
Line 1261:Expected statement, found "(" instead.

I could try fixing those seemingly simple errors myself, but I don't know if that would break things further, especially since I really have no idea what I'm doing. I'd rather not risk it.

The only exception to all this is when I load the demo project - then it works perfectly fine. But if I put it into my own project, or into a demo/learning project by Godot, then it doesn't work.

The version I'm using is 4.2.2.

What should I do?

redlemonsydney avatar Jul 25 '24 18:07 redlemonsydney

This addon first made for Godot 3.x, I think you downloaded the Godot 3.x version, can you make sure to download from here?

Note: There is still some visuals missing in Godot 4 version, I am working on it.

XLIVE99 avatar Jul 26 '24 09:07 XLIVE99

I tried downloading from the embedded link, but it still gave me the exact same scripts. Is there a chance you accidentally uploaded the Godot 3 version?

redlemonsydney avatar Jul 27 '24 11:07 redlemonsydney

I have published new release (v1.3) with some small improvements. Can you try that too? Can you share the errors or screenshot of the errors with me If it doesn't work?

XLIVE99 avatar Jul 27 '24 15:07 XLIVE99

I'll get back to you when I can, in a game jam rn

redlemonsydney avatar Jul 28 '24 18:07 redlemonsydney

The addons folder isn't updated, only the demo project is

AlbinoElk avatar Jul 31 '24 13:07 AlbinoElk

@AlbinoElk Thanks, I forgot to update that. I will probably remove that addons folder in the future to avoid confusion. Regardless, I recommend to download from releases.

XLIVE99 avatar Jul 31 '24 14:07 XLIVE99

Changing the branch from Main to 4.X should give you the latest version for godot 4.X

Ryuggo avatar Aug 04 '24 22:08 Ryuggo

@Ryuggo Thanks for reporting the release version was wrong. I have updated the releases for Godot 4 version

XLIVE99 avatar Aug 05 '24 06:08 XLIVE99

Does it work for 4.2.2? The bitmap boxes don't show up.

image

MTandi avatar Aug 08 '24 14:08 MTandi

@MTandi You have to create bitmask first. You can create it either with "AutoGrid" button which located on top menu or use the shortcut "Shift + T" while MeshInstance node is selected.

XLIVE99 avatar Aug 08 '24 14:08 XLIVE99

@XLIVE99 Output has this line, on attempt to create a bitmask.

  res://addons/AutoGrid/edit_button.gd:56 - Invalid call. Nonexistent function 'instance' in base 'PackedScene'.

MTandi avatar Aug 08 '24 14:08 MTandi

@MTandi I fixed it, and updated the release file. I didn't get that error while testing. Thanks for reporting.

XLIVE99 avatar Aug 08 '24 15:08 XLIVE99