For debugging convenience I would like to display log messages directly in the game. Is it possible to send the log messages to a text object?
Thank you - as always.
For debugging convenience I would like to display log messages directly in the game. Is it possible to send the log messages to a text object?
Thank you - as always.
Do you mean the debugging log? If so, and if you are sending the message to that already, then just write it to the text box.
Yeh itâs simple too. Iâm guessing youâre using variables, in that just put the variable itâs self in the text object like this Park_txt set to This is example variable Distant and that itâs it. This is just example but if you could show us your events it will be easier to see what you had in mind and easier for us to help you
I imagine that I would have one long line textbox at the bottom of my game, that would âprintâ each log message, similar to what the Debugger does. Of course I could go to each of my log messages and manually also send them to this textbox, but I wondered if there is a generalized way to do it.
I think this is the way to go. Remember GDevelop has a NewLine() function that will add a new line character to your text, so it doesnât have to appear as a long line of text. Use it like "Hello world," + NewLine() + "How are you today?"
I usually create a Global Variable (String) called âDebugLogâ and just append new messages to it with a newline character \n. Then, have one Text object that always updates to that variable. Itâs a lifesaver for mobile testing when you canât see the browser console!
Thank you - that is a nice way of doing it!