Option to auto delete unused Game objects and variables

Hello all,
I am in a post-production stage of my game, where i am kinda in an issue. During the entire course of development many objects and variables were created. But at this point many of those unused objects and variables are just sitting there. (I am not talking about unused resources, but the game object itself). Those object and variables are not called even once in any of the event sheets. It would be very useful to have a feature to quickly scan through and mark (or possibly delete) every unused variables and game objects.
Now sure this can cause some accidents, but it can still be added with some extra warnings like “type the name of the project” or “Type your password” to complete this process.

Thank you.

3 Likes

in some way it could be useful, but I would be too scared to activate such a function, so I wouldn’t risk activating it, but to overcome your problem you could reuse these objects instead of creating new ones, or you delete them one by one by hand, like this you don’t have confusion in the object bar, or you can do what I do and create a “trash” folder and put them all in there then when I’ve carefully checked that I don’t need them I delete them all at once. although what I would like is the option that tells you in how many events the following objects are present.

Hand by hand isn’t the best option when you have 300+ resources and 25+ event sheets to go through. Even something that can analyze and tell which objects are called how many times in the events can massively help here.

1 Like

Hello PihRealms.
One question: why not deleting objects and variables as you go instead of waiting at the end of the project when it’s less likely to remember which objects need to be deleted?
I am curious.

I can answer that
You see in most cases i bet all of us do
BUT sometimes we keep crap because we MAYBE gonna use it
Then we forget about them and we do not know is it used somewhere or not

For example i am making simple menu now i already prepared some elements like separators for window and text objects
1 week from now i won’t remember which i actually used and so which i can delete
I may have some idea but i would be afraid to do so
Imagine 1 month from now if i would have over 50 elements for something

And here where feature to delete unused stuff would come in handy

2 Likes

First of all sorry, for this late reply.

And i agree with your point, infact its the most logical thing to do. But we all are humans, ignorance to such issue i guess would be common ! Also while making a system, i don’t get it right immediately. I need double the expected time and code and a lot of tweeking’s. After hours of frustration and thinking, when it finally works, ideally you would expect a good programmer to go though and clean the code. Sadly most of us don’t. maybe because we are not hyper-focused and experienced in making games but instead are here just to learn and have fun.

Like everyone in here is to learn right?, I mean Gdevelop is one of the easiest and most convenient tool to get into game development. Which means you would definitely have more of the beginner users than experienced ones. **So you do have a completely logical point, for me and i can assume many others this would be a very useful feature. (I assumed this should not be too difficult to add as there is already and object instance counter. Having same kinda system to just display the number of times the objects are actually used/called as parameters in event sheet should already help a lot with this. Now i am not aware of how difficult this would be, all i have is assumptions ) **

2 Likes