Removing @editable from a constant value locks the value to the value that was manually set from the details panel while the constant was editable.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
Create a new verse script.
Add @editable value, for example @editable MyNumber : int = 5
Build verse code, place the device in the world.
Change the editable value of MyNumber in the details panel to 15
Build changes.
OnBegin print value of MyNumber, prints as 15.
Remove @editable from MyNumber
Push verse changes
OnBegin still prints MyNumber as 15 which was the value set through details panel while the value in code is the default 5.
Value now always locked to 15 no matter what I change it to through code.
Expected Result
When removing @editable from MyNumber the value should be whatever is in the code not what was set on the editable in the details panel.
Observed Result
The value is still there from the value that was set on the editable in the details panel
That is intendeed, it keeps a reference to every class instance (and any overriden property inside of it)… @editable just expose the value to the editor, but not having it does not mean that the class itself has not overriden the value (You can override on other places such as inside the code too)…
On your video you say “What if I don’t want it to be editable and now being a constant“. But a constant can still be overriden on created class instances and/or subclasses. If you want a value that is not possible to be overriden, it should be marked as , such as:
my_class := class{
MyValue<final> : int = 7 # Since this is marked as final, instances and subclasses of this class can’t override it to any other value`
}
I agree that it may cause bugs, and epic also knows it, in Scene Graph they are explicitly showing a warning when outdated values are present due to changes on the code (such as deleting/renaming properties or removing the editable attribute).
With that, it lets you discard the old value, or ignore and keep it as you may want (with the warning still displaying so the user knows about it): Data Recovery Tool in Unreal Editor for Fortnite | Fortnite Documentation | Epic Developer Community
So, the bug to be reported here would be the verse creative devices not showing the warning of hidden overrides, and not the functionality itself… The functionality has nothing wrong with it, and the confusion that it may cause is only due to the lack of communication (no warnings displayed about)