0 votes

I have often got stuck assuming that Array.remove() will return the item being removed. Seems to be 99% that I call remove I am planning on using the item that I am removing. If remove() returned the item rather that void it would be convenient and save a line of code. Is there a reason why this isn't the way remove works? If it would be too inefficient then prehaps we could add a method call liked "popFrom(int position)" that would add that line of code. I know I can just write a helper function and include it in my autoLoad. I guess I'm more so curious why remove does not return the item in the first place.

Thank you, and happy godoting.

-Slice

in Engine by (14 points)

1 Answer

0 votes

You can post feature requests at https://github.com/godotengine/godot/issues

This seems like a good feature. I don't know if there's a technical reason to not have this feature.

by (190 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.