cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

After changing enum, the reference value in the component will not be modified at the same time.

Open smallmain opened this issue 10 months ago • 4 comments

Cocos Creator version

3.8.2

System information

MacOS

Issue description

Sometimes this can lead to problems that are hard to track down.

enum E {
A = 1,
}

change to:

enum E {
A = 100,
}

No error is reported, but the value is already an invalid value.

Now even opening a prefab with invalid values ​​will not prompt.

Relevant error log output

No response

Steps to reproduce

.

Minimal reproduction project

No response

smallmain avatar Apr 23 '24 06:04 smallmain

Also related to this proposal: https://github.com/cocos/cocos-engine/issues/15941

smallmain avatar Apr 23 '24 06:04 smallmain

Is it an issue about editor?

minggo avatar Apr 23 '24 08:04 minggo

Reference

yes, @property.

smallmain avatar Apr 23 '24 11:04 smallmain

The value saved in the prefab file is 1, but it has actually been changed to 100. There should be an error or automatic reconstruction.

smallmain avatar Apr 23 '24 11:04 smallmain