Make a property unchangable

Hello, I’m new to defold so its problay a noob quastion, but when I make a new script property I can edit it in the outline. Can I somehow make it so I won’t be able. To change it, and it will just present the value of the script property?

Nope.

I guess you could get creative, store the values in read-only tables in init() and then read only from there. The original properties on self would still be changeable, but your script would just ignore them.

Can you explain why you want it to be read only?

2 Likes

Just for convinience sake, so when I show the game to someone (who doesn’t understand code) the impotent properties would be displayed

Ok, thanks. maybe I’ll try that