fix godot crash when Visible Collision Shapes is enabled (#2761)

This commit is contained in:
Ferdy's Lab 2025-02-25 16:23:19 +07:00 committed by GitHub
parent 5ef9772e7a
commit 5d23a7df19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1216,8 +1216,9 @@ void SpineSprite::draw() {
}
#if TOOLS_ENABLED
float editor_scale = EditorInterface::get_singleton()->get_editor_scale();
float editor_scale = 1.0;
if (Engine::get_singleton()->is_editor_hint()) editor_scale = EditorInterface::get_singleton()->get_editor_scale();
float inverse_zoom = 1 / get_viewport()->get_global_canvas_transform().get_scale().x * editor_scale;
Vector<String> hover_text_lines;
if (hovered_slot) {