+2 votes

There's support for Array and List, but no Set.

If I want to use a Set in GDScript, do I have to implement my own?

Edit: I plan on using a dictionary where I just point to null. Could wrap this with a Set class I guess.

in Engine by (14 points)

IMHO a Dictionary could serve well as set. You can add items, check if it contains items and remove them again. If that isn't sufficient then I propose you provide an example or more details in any way.

No, you're right. And i did implement my logic in this way. It just makes the code really ugly.

Please log in or register to answer this question.

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.