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

Add signal to scene tree when a node entering or exiting group #11562

Closed
qt911025 opened this issue Jan 15, 2025 · 2 comments
Closed

Add signal to scene tree when a node entering or exiting group #11562

qt911025 opened this issue Jan 15, 2025 · 2 comments

Comments

@qt911025
Copy link

Describe the project you are working on

A game.

Describe the problem or limitation you are having in your project

Godot can call methods or set values via some group calls, but it only affects nodes in a group currently. In the circumstance of changeful group, new nodes can't be affected while joining a group or enter a tree(with group joined already) for lacking of corresponding event, thus making new nodes complicated to do decorations like adding child or connecting signal.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

"enter_group" signal for scene tree happens when a node (already in scene tree) is added to a group, or a node (already in group) enters scene tree, and "exit_group" does the opposite.

The 2 signals emit with 2 parameters: target node and group name.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If this enhancement will not be used often, can it be worked around with a few lines of script?

Is there a reason why this should be core and not an add-on in the asset library?

To fit with native godot interface, otherwise the add on should implement a whole wrapper to wrap functions already implemented.

@AThousandShips
Copy link
Member

@Calinou
Copy link
Member

Calinou commented Jan 15, 2025

Thanks for the proposal! Consolidating in #1259.

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

No branches or pull requests

3 participants