We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.4.4.stable.arch_linux
Arch
Connecting to the size_changed signal on get_tree().get_root() does not work if using a custom SceneTree loaded via the -s command line argument
size_changed
-s
-s SceneTreeCustom.gd
extends SceneTree class_name SceneTreeCustom func _initialize(): _on_viewport_resized() root.connect("size_changed", self, "_on_viewport_resized") func _on_viewport_resized(): prints("Resizing:", root.size)
or via another script
func _ready(): _on_viewport_resized() get_tree().root.connect("size_changed", self, "_on_viewport_resized") func _on_viewport_resized(): prints("Resizing:", get_tree().root.size)
No response
The text was updated successfully, but these errors were encountered:
Screen size is not always the same as viewport but this works for what I needed to do:
extends SceneTree class_name SceneTreeCustom func _initialize(): self.connect("screen_resized", self, "_on_screen_resized") func _on_screen_resized(): prints("Resizing window:", get_root().size, OS.get_window_size())
Sorry, something went wrong.
No branches or pull requests
Godot version
3.4.4.stable.arch_linux
System information
Arch
Issue description
Connecting to the
size_changed
signal on get_tree().get_root() does not work if using a custom SceneTree loaded via the-s
command line argumentSteps to reproduce
-s SceneTreeCustom.gd
size_changed
signal on viewportor via another script
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: