You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I have a large amount of groups in my game. It's very difficult to manage and keep track of them. They are assigned arbitrarily in the editor and there are probably groups assigned to certain scenes that are no longer in use. Also it's very error prone since I'm just using strings everywhere. I also have a singleton I use to reference the groups in code but I need to make sure my singleton matches the strings I'm assigning in the visual editor.
Some people have suggested I only assign groups programmatically but sometimes it's not convenient to do that when I want a particular instance of a scene to belong to a different group than it normally would.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In order to have a single source of truth I would like groups to be used in this way.
User must assign group names in project settings.
In the scene you are only allowed to change group assignment from a pre-existing list.
In the code editor the groups would be available to use in singleton form.
If it followed this format it would be one step to change group names or remove groups project-wide. It would also be impossible to make a spelling error or waste your time trying to remember if the group is named "enemy" or "enemies."
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
In the project settings we add a Group Names section right above Layer Names. This is the master list of groups that we can do normal CRUD operations on. The rest of the project updates accordingly based on this.
This is how we'd reassign groups within a scene.
# in code
var nodes_arr = get_tree().get_nodes_in_group(Groups.actors)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't believe so because there's a lot of management involved in making sure your groups are correct. It could technically be done if you only use groups programmatically using a singleton but its much less convenient than being able to use the editor. My change would also remove the need for creating your own singleton that matches the groups you set in the visual editor.
Is there a reason why this should be core and not an add-on in the asset library?
Using groups is a central part of Godot and I believe this would make it much easier to use and less error prone for everybody.
The text was updated successfully, but these errors were encountered:
hamoom
changed the title
Improved Groups management.
Groups management from project settings.
Jan 12, 2022
YuriSizov
changed the title
Groups management from project settings.
Allow to manage groups from the project settings
Jan 12, 2022
Describe the project you are working on
I'm working on a 2D action RPG.
https://www.youtube.com/watch?v=0Y0-lZd_tD0&ab_channel=hamoom
Describe the problem or limitation you are having in your project
I have a large amount of groups in my game. It's very difficult to manage and keep track of them. They are assigned arbitrarily in the editor and there are probably groups assigned to certain scenes that are no longer in use. Also it's very error prone since I'm just using strings everywhere. I also have a singleton I use to reference the groups in code but I need to make sure my singleton matches the strings I'm assigning in the visual editor.
Some people have suggested I only assign groups programmatically but sometimes it's not convenient to do that when I want a particular instance of a scene to belong to a different group than it normally would.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In order to have a single source of truth I would like groups to be used in this way.
If it followed this format it would be one step to change group names or remove groups project-wide. It would also be impossible to make a spelling error or waste your time trying to remember if the group is named "enemy" or "enemies."
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
In the project settings we add a Group Names section right above Layer Names. This is the master list of groups that we can do normal CRUD operations on. The rest of the project updates accordingly based on this.
This is how we'd reassign groups within a scene.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't believe so because there's a lot of management involved in making sure your groups are correct. It could technically be done if you only use groups programmatically using a singleton but its much less convenient than being able to use the editor. My change would also remove the need for creating your own singleton that matches the groups you set in the visual editor.
Is there a reason why this should be core and not an add-on in the asset library?
Using groups is a central part of Godot and I believe this would make it much easier to use and less error prone for everybody.
The text was updated successfully, but these errors were encountered: