I was wondering if Roblox Studio has something similar to Unity in the way of serialized properties.
In Unity, you can mark a variable as serialized with the [Serializable]
attribute.
This property then shows up as an editable field in the Unity Editor under that script or object. Not only is this extremely handy for editing values when iterating, Unity also allows you to bind specific types of objects (cameras, instances, other scripts) to these values in the editor.
So far in Roblox Studio I’ve just been using Attributes a la script.Parent.GetAttribute()
. Attributes can be a little hidden away like this (and I also haven’t found a way to make attributes on scripts work specifically with roblox-ts yet) so editing these values in code ends up being faster most of the time. Noteworthy here is that this only works for the datatypes that attributes actually support.
For actually referencing objects in the tree, I think I’m stuck with finding by a combination of type and name? Is there a faster way to find objects? The Tag system could be used for this, but I was wondering if I could directly reference/link instances from the Roblox Studio interface instead, or otherwise quickly add a unique reference to another object in the tree.