0 votes

I want to make a tool script that can manipulate the layers on a TileMap. I want to have an export enumerator variable. This is easy enough with:
@export_enum(<options>) var my_enum: int

However, I can only seem to declare the enumerator's options by hand in the script. I want to be able to pick between the TileMap's layers, where there might be a different number for each TileMap. I can get the TileMap's layers as either a number, array of strings or whatever easily enough, but how do I put it in the export enumerator?


Godot version Godot 4.0 beta 4
in Engine by (146 points)

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.