godotengine / godotengine/godot

Enumeration option cannot be selected in exported variable of type enum

Open
#96,368 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

Tested versions

v4.4.dev1.official [28a72fa43]

System information

w10 64

Issue description

Note this code:
Father.gd has only one enumeration "TestEnum"

Captura2

test.gd inherits from Father.gd
test.gd declares a new enumeration "TestEnum2"

Captura

If you initialize the enumeration so that the values ​​do not match the enumeration in Father.gd, the option in the enumeration "Test3" in test.gd will not be selectable in the editor.

Captura

Note the comments above each enumeration in "test.gd"

The "Test3" option becomes selectable when you assign the values ​​to the test.gd enumeration in the same order as Father.gd has them.

Steps to reproduce

Try selecting the "Test3" option in the enumeration in the editor

Minimal reproduction project (MRP)

testenum.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached testenum.zip reproduction, including Father.gd and test.gd, and reproduce the editor behavior described in the steps. Check the exported enum in test.gd when its values differ from Father.gd; done means the Test3 option is selectable regardless of enumeration order.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.