Access Text Printed to Output Panel In-Game

Godot Version

4.3

Question

Is it possible to access text that has been printed to Godot’s output panel via the print function? I am trying to create a label that will automatically display printed text in-game by directly accessing this output panel that is usually independent of the game itself.

1 Like

tbh I would think about creating a custom print method inside of an autoload.
That way you could potentially execute something like Global.logPrint("Hello")
Which will go into

#global.gd autoload

var logs: Array[String]
func logPrint(msg: String) -> void:
    print(msg)
    logs.append(msg)

you then have more control over what is printed, maybe add who initiated the print and also opportunities to filter and count your log entries

I believe your Terminal Output screen functions via “fire and forget”, therefore it’s not possible to retrieve and manage whatever was printed out

1 Like

Thank you. I assumed there wasn’t a way to access the Terminal Output, so I will likely end up using a similar solution via static functions and variables.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.