Hello.
I would like to be able to “lock” variables in the inspector during runtime.
I have some public variables that are only used in the start and never in the update.
I want that once the execution starts they become read only, because even if you change them you will not see changes in the execution and people (or me in the future) may make a mistake.
I have found this ( and tested it ):
If I use the CustomAttribute created “[ReadOnlyWhenPlaying]” they become readonly on execution, but if I use a [Range(0,10)] the slider never appears (it is a numerical textbox).
If I use “[Range(0,10)]” before “[ReadOnlyWhenPlaying]” the slider appears but the readonly does not work.
What is missing in the “ReadOnlyWhenPlayingAttributeDrawer.cs” to make it work properly?
(Check the code of the file in the link)
Thanks.
PS: Text is translated with Deepl Translator (sorry if exists mistakes).