Skip to content

Commit

Permalink
CraterCrashGH-761 Use new ClassDB methods to fetch property getter/se…
Browse files Browse the repository at this point in the history
…tter
  • Loading branch information
Naros committed Sep 8, 2024
1 parent 57c0207 commit 32a2b02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editor/graph/actions/default_action_registrar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,13 @@ void OrchestratorDefaultGraphActionRegistrar::_register_properties(const String&
}
}

#if GODOT_VERSION >= 0x040400
const String getter_name = ClassDB::class_get_property_getter(p_class_name, pi.name);
const String setter_name = ClassDB::class_get_property_setter(p_class_name, pi.name);
#else
const String getter_name = vformat("get_%s", pi.name);
const String setter_name = vformat("set_%s", pi.name);
#endif

bool has_getter = false;
if ((global_class.name.is_empty() && ClassDB::class_has_method(p_class_name, getter_name))
Expand Down

0 comments on commit 32a2b02

Please sign in to comment.