I have a control that has a bunch of buttons. I need that every button have a variable that I will assign once and never will be changed (an ID). Now I have this implemented by creating a new scene (IdButton) that ineriths from Button and has an exported var:
extends Button
export (int) var id
All my buttons are not from Button type, but IdButton type and they have a new Id variable that I can use in the editor.
There is no really a problem with that, just that I think that it's not very clean to have a new scene and a new script just to have an exported variable. Is there any better method to implement this?