Closed baransrc closed 2 years ago
You should be able to add __tostring
metamethod to your userdata object and it will be used to display the object in the watch/stack windows. You can also return a table from the __tostring object, which allows you to display a table if that's the best representation for your userdata object. You won't need anything else to support this on the IDE side.
Thanks!!
Greetings,
I have been testing LUA to integrate it to the game engine we are creating on our Master's degree project. For it to be a feasible option for us to use as the scripting language of our engine, I'm trying to see how much debug-able LUA is through your lovely IDE.
In the dummy LUA script I've written, we are using user types that is defined by the Engine code using LUA binding library sol. Is there a way to see the details of them, such as their fields and values of their fields?
Right now what we have is:
Where
hachiko.entity
is anEntity
and it has a field calledID
for example. Of course when I addhachiko.entity.ID
to watch window, it shows its value, but I wanted to see if there is a functionality that handles this for each field of user defined types automatically(Like the watch of Visual Studio). I'm sorry if this is a silly question to ask as I'm a C++ and I'm not used to LUA enough.Sincerely yours, Baran