microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.39k stars 4.57k forks source link

log_messages_hidden bug: code doesn't clear screen #1583

Closed Lotjeotje closed 5 years ago

Lotjeotje commented 5 years ago

In the LogMessage function in AirBlueprintLib.cpp (line 155 - 159) there is a bug in the part where log_messages_hidden is set to true. It only enables printing new LogMessages (so updating it) but the code doesn't clear the screen.

void UAirBlueprintLib::LogMessage(const FString &prefix, const FString &suffix, LogDebugLevel level, float persist_sec)
{
    if (log_messages_hidden_)
        return;

...

I solved the problem by writing is like this:

if (log_messages_hidden_) 
{
    if (GEngine) {
        GEngine->ClearOnScreenDebugMessages();
    }
    return;
}
NextSim commented 5 years ago

1007

madratman commented 5 years ago

Let's track this in #1007. Closing to avoid duplicates, we already have too many issues