Runtime class reflection for builtin classes

As a Roblox developer, it is currently too hard to perform reflection on builtin classes. For example, if I want to get a list of properties of the Lighting service, I have to either manually type them out or do some shenanigans with HttpService to get an up-to-date property list. Both are incredibly tedious. Something like Instance:GetProperties() would be a nice solution, giving a list of properties that contains their property name and expected value, as well as if it’s assignable (i.e. read-only or read-write capable) and any other relevant information.

If Roblox is able to address this issue, it would improve my development experience because there are oftentimes cases where I need to cache properties for later. For example, getting a list of Lighting properties when the server starts so I can reset back to a “default” state if I ever change any of the lighting properties. Currently, I have to manually type out each property I want to cache and set it manually as well.

10 Likes

Hi Joshument, thank you for the feature request! This is on our radar and we’d like to do it, but there is no ETA for it yet. We’ll post here if we have an update on this.

9 Likes

I’ve often found myself needing something like this! It would be a fantastic addition for plugin development.

2 Likes