Please consider the following change to the chat system, in order to allow debug messages to be shown from before EVENT_PLAYER_ACTIVATED.
Lua Code:
function SharedChatSystem:Initialize(control, platformSettings)
self.cachedMessages = {}
...
Lua Code:
function SharedChatSystem:AddMessage(text)
if IsChatSystemAvailableForCurrentPlatform() then
if(self.primaryContainer) then
self.primaryContainer:AddDebugMessage(text)
else
self.cachedMessages[#self.cachedMessages + 1] = text
end
end
end
Lua Code:
local function FlushMessageCache()
for i = 1, #self.cachedMessages do
self.primaryContainer:AddDebugMessage(self.cachedMessages[i])
end
self.cachedMessages = nil
end
local function OnPlayerActivated()
playerActivated = true
TryLoadingSettings()
if IsChatSystemAvailableForCurrentPlatform() then
if(not self.allowMultipleContainers) then
self:RedockContainersToPrimary()
end
self:TryNotificationAndMailBursts()
if(self.isAgentChatActive) then
self.agentChatBurstTimeline:PlayFromStart()
end
else
self.control:SetHidden(true)
end
FlushMessageCache()
end