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

set_deferred method is invalid #80002

Closed
CodeLazier opened this issue Jul 29, 2023 · 1 comment · Fixed by #80081
Closed

set_deferred method is invalid #80002

CodeLazier opened this issue Jul 29, 2023 · 1 comment · Fixed by #80081

Comments

@CodeLazier
Copy link

CodeLazier commented Jul 29, 2023

Godot version

4.2 Dev 2

System information

Win10

Issue description

An area node, and setting area.set_deferred ('monitoring', true) in gdscript,and then 4.2 Dev 1 and below are no problem.
Updating to Dev2 failed, and tests found that setting other properties was also ineffective, such as Sprite2D.set_deferred('position', Vector2(100,100))

Steps to reproduce

add area node in scene
write the code in _read callback

func _ready() -> void:
	area_2d.set_deferred('monitoring',true)

run,observe the node properties in the property inspector

Minimal reproduction project

test_bug.zip

@kleonc
Copy link
Member

kleonc commented Jul 29, 2023

Caused by #78987, cc @RandomShaper.

CallQueue::push_set creates a Callable with the property name passed as the method. 🙃

msg->callable = Callable(p_id, p_prop);

Hence for such message the added check fails as object doesn't have such method:
if (!message->callable.is_valid()) {

return get_object() && get_object()->has_method(get_method());

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.

2 participants