UELog | Unreal Engine inspired on-screen log

Unreal Engine inspired on-screen log that reads from print(), warn() and error().

Hello. I’ve created a very easy to use simple log screen based on the Unreal Engine on-screen log that uses LogService to read from the output and show it to the screen. Should also work in-game. As always I am not claiming that this is the “optimal” way. I’m just sharing this because I got bored of the looking at the F+9 screen.

Some examples of how it looks:


Features

  • Reads from print(), error() and warn().
  • Different customizable colors for each Enum.MessageType.
  • High customizability.
  • Works in live games ( from what i found out )

Use

Simple use case:

UELog.rbxm (4,1 Kt)

  1. Download the model and insert it into a script.
    image

  2. require the module and create a newlog with the UELogModule.new().

local UELog = require(script:WaitForChild("UELog"))
local newLog = UELog.new()

--# It has now autoconnected the connections to LogService. No need to do anything more.

API

The module has a pretty easy base api. Only a few methods:

UELog.new() --# Creating a new log.
newLog:CreateMessage(string, Enum.MessageType?) --# Showing custom messages.
newLog:Clear() --# Clears the log from any messages.
newLog:Destroy() --# Destroys the log and clears any connections.

Customization

The module has a fair amount of customization.
If you want to customize the default values you can go to line 9 of the module.
Otherwise follow the following list:

newLog:Disable() --# Disables the log screenGui.
newLog:Enable() --# Opposite of :Disable().
newLog:SetPosition(Udim2) --# Sets the position of the log.
newLog:SetWidth(Udim) --# Sets the width of the log.
newLog:SetFont(font) --# sets the font of the log.
newLog:SetColor(Enum.MessageType, Color3) --# Sets the on-screen color of the specific MessageType.
newLog:SetColors({[Enum.MessageType]: Color3}) --# Overrides all the colors with new ones.
newLog:SetPadding(Udim) --# Sets the padding between the messages.
newLog:SetFadeTime(number) --# Sets the optional transparency fade time for when messages cross their lifetime.
newLog:SetLifeTime(number) --# Sets the lifetime of the messages in the log.
newLog:DoShowTime(boolean) --# Determines if the timestamp of the message is shown.

Example use of all the methods:

local mod = require(script:WaitForChild("UELog"))
local new = mod.new()

new:Clear()
new:CreateMessage("Hello!", Enum.MessageType.MessageError)
new:Disable()
new:Enable()
new:Destroy()
new:SetPosition(UDim2.fromScale(.25,.25))
new:SetWidth(UDim.new(0, 500))
new:SetFont(Font.fromEnum(Enum.Font.Code))
new:SetColor(Enum.MessageType.MessageInfo, Color3.fromRGB(255,255,255))
new:SetColors(
	{
		[Enum.MessageType.MessageInfo] = Color3.fromRGB(255,255,255),
		[Enum.MessageType.MessageOutput] = Color3.fromRGB(255,255,255),
		[Enum.MessageType.MessageError] = Color3.fromRGB(255,255,255),
		[Enum.MessageType.MessageWarning] = Color3.fromRGB(255,255,255)
	}
)
new:SetPadding(UDim.new(0,7))
new:SetFadeTime(1)
new:SetLifeTime(5)
new:DoShowTime(true)

Hopefully someone finds an use to this. Thank you for reading.

25 Likes

so cool, i will use it :oncoming_fist:

(30char)

2 Likes

Will be using
(ABCDEFGHIJK 30)

Very cool. will definitely be using

this is actually cool, thanks so much