-
-
Couldn't load subscription status.
- Fork 390
Description
Is your feature request related to a problem? Please describe (REQUIRED):
Inconvenience of usage of script component properties with e.g. hashes, than can have typos.
Describe the solution you'd like (REQUIRED):
Allow to use a table of hashes in go property API to define a "enum" of available values (hashes or integers?) to choose from.
go.property("card_types", { hash("special_card_1"), hash("special_card_2"), hash("normal_card_1") })
go.property("spawn_amount", { 2, 5, 10 })Then in Properties Pane in Editor - those can be selected from a drop-down menu (similarly like e.g. some GUI properties:)
Describe alternatives you've considered (REQUIRED):
Group several other existing properties into a "group" ?
go.property("type_1", 1)
go.property("type_2", 2)
...
go.group_properties({"type_1", "type_2", ... })Additional context (OPTIONAL):
https://forum.defold.com/t/enum-script-properties/12620
Similar:
#10655

