-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Remove Node.get_position_in_parent() #37556
Conversation
Why remove this and not the other? It's shorter and perfectly aligns with the fact that the result will be used as an |
I agree, get_position_in_parent() is waaay too wordy... |
It's more descriptive though. Maybe we could come up with a completely new name? |
I don't think that such function needs a verbose name. It's a function that returns node's index in its parent. Should we call it Calling it Edit: Also, a "position in parent" may mean something different for 2d and 3d nodes, so that name may even be confusing for some. |
|
How about |
I think |
Well, if we must include a reference to the parent, then In fact, I can't think of any adjective to put before the word |
get_node_index() maybe? But get_index also implies that node is inside a collection which will have a parent anyway. |
That's what documentation is for, thanks goodness Godot has good accessibility for docs. EDIT: oops, literally quoted #37556 (comment). |
Since This way we can avoid having a duplicate methods for now, and we can maybe rename |
Heh, looks like |
Thanks! |
See #21802