Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use TileMap.cell_quadrant_size in 4.2 #85423

Closed
inhalt120g opened this issue Nov 27, 2023 · 3 comments · Fixed by #85463
Closed

Error when trying to use TileMap.cell_quadrant_size in 4.2 #85423

inhalt120g opened this issue Nov 27, 2023 · 3 comments · Fixed by #85463
Milestone

Comments

@inhalt120g
Copy link

Godot version

v4.2.rc2.official [1ba920f]

System information

Godot v4.2.rc2 - macOS 14.1.1 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

Crash when trying to use "cell_quadrant_size".

The same project works without problems in 4.1.3

Steps to reproduce

Open the attached project and run it, it'll crash. "Invalid get index"
スクリーンショット 2023-11-27 16 35 07

Here is what the same project looks like when launched from 4.1.3:
image

Minimal reproduction project

engage bug 03.zip

@akien-mga akien-mga changed the title Crash when trying to use "cell_quadrant_size" Error when trying to use TileMap.cell_quadrant_size in 4.2 Nov 27, 2023
@akien-mga
Copy link
Member

akien-mga commented Nov 27, 2023

It was renamed to rendering_quadrant_size in 4.2, but it seems like we didn't include sufficient compatibility code to handle the transition.

CC @groud @KoBeWi

We should at least still handle the old property name in _get/_set. We have compatibility methods for GDExtension, but no compatibility property. And even the compat methods are not exposed to GDScript so using the methods fails too:

SCRIPT ERROR: Invalid call. Nonexistent function 'get_quadrant_size' in base 'TileMap'.
          at: _ready (res://project.gd:7)

That part is out of scope for 4.2, but we should either figure out if we can expose compat methods to GDScript/C#, or use them to provide better error handling.

@akien-mga akien-mga added this to the 4.2 milestone Nov 27, 2023
@AThousandShips
Copy link
Member

Note that this is also tracked here, but backwards compatibility would be helpful here at least some error

@inhalt120g
Copy link
Author

Indeed it works with "rendering_quadrant_size", thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants