You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- added message log to StateTree editor - added statistics window to StateTree editor - converted baker and property copy to use compiler log instead of UE_LOG #jira none #review-17959825 #robomerge 5.0 [CL 17975651 by mikko mononen in ue5-main branch]
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StateTreeCompilerLog.h"
|
|
|
|
#include "StateTreeState.h"
|
|
#include "Developer/MessageLog/Public/IMessageLogListing.h"
|
|
#include "Misc/UObjectToken.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "StateTreeEditor"
|
|
|
|
void FStateTreeCompilerLog::AppendToLog(IMessageLogListing* LogListing) const
|
|
{
|
|
for (const FStateTreeCompilerLogMessage& StateTreeMessage : Messages)
|
|
{
|
|
TSharedRef<FTokenizedMessage> Message = FTokenizedMessage::Create((EMessageSeverity::Type)StateTreeMessage.Severity);
|
|
|
|
if (StateTreeMessage.State != nullptr)
|
|
{
|
|
Message->AddToken(FUObjectToken::Create(StateTreeMessage.State, FText::FromName(StateTreeMessage.State->Name)));
|
|
}
|
|
|
|
if (StateTreeMessage.Item.ID.IsValid())
|
|
{
|
|
Message->AddToken(FTextToken::Create(FText::Format(LOCTEXT("LogMessageItem", " {0}"), FText::FromName(StateTreeMessage.Item.Name))));
|
|
}
|
|
|
|
if (!StateTreeMessage.Message.IsEmpty())
|
|
{
|
|
Message->AddToken(FTextToken::Create(FText::FromString(StateTreeMessage.Message)));
|
|
}
|
|
|
|
LogListing->AddMessage(Message);
|
|
}
|
|
}
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|