Merge branch 'marcel/ue5.3' of https://github.com/carla-simulator/carla into jose/ue5.3/instancesegmentationcamera
This commit is contained in:
commit
b83c931972
|
@ -221,11 +221,13 @@ void UMapGenFunctionLibrary::FlushRenderingCommandsInBlueprint()
|
||||||
FlushPendingDeleteRHIResources_GameThread();
|
FlushPendingDeleteRHIResources_GameThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WITH_EDITOR
|
||||||
extern UNREALED_API UEditorEngine* GEditor;
|
extern UNREALED_API UEditorEngine* GEditor;
|
||||||
|
#endif
|
||||||
|
|
||||||
void UMapGenFunctionLibrary::CleanupGEngine(){
|
void UMapGenFunctionLibrary::CleanupGEngine(){
|
||||||
GEngine->PerformGarbageCollectionAndCleanupActors();
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
|
GEngine->PerformGarbageCollectionAndCleanupActors();
|
||||||
FText TransResetText(FText::FromString("Clean up after Move actors to sublevels"));
|
FText TransResetText(FText::FromString("Clean up after Move actors to sublevels"));
|
||||||
if ( GEditor->Trans )
|
if ( GEditor->Trans )
|
||||||
{
|
{
|
||||||
|
|
|
@ -383,11 +383,12 @@ void FCarlaEngine::OnEpisodeSettingsChanged(const FEpisodeSettings &Settings)
|
||||||
|
|
||||||
bSynchronousMode = Settings.bSynchronousMode;
|
bSynchronousMode = Settings.bSynchronousMode;
|
||||||
|
|
||||||
|
#if WITH_EDITOR
|
||||||
if (GEngine && GEngine->GameViewport)
|
if (GEngine && GEngine->GameViewport)
|
||||||
{
|
{
|
||||||
GEngine->GameViewport->bDisableWorldRendering = Settings.bNoRenderingMode;
|
GEngine->GameViewport->bDisableWorldRendering = Settings.bNoRenderingMode;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
FCarlaEngine_SetFixedDeltaSeconds(Settings.FixedDeltaSeconds);
|
FCarlaEngine_SetFixedDeltaSeconds(Settings.FixedDeltaSeconds);
|
||||||
|
|
||||||
// Setting parameters for physics substepping
|
// Setting parameters for physics substepping
|
||||||
|
|
|
@ -428,8 +428,9 @@ void ALargeMapManager::GenerateMap(FString InAssetsPath)
|
||||||
LoadCarlaMapTile(InAssetsPath + "/" + AssetData.AssetName.ToString(), TileId);
|
LoadCarlaMapTile(InAssetsPath + "/" + AssetData.AssetName.ToString(), TileId);
|
||||||
}
|
}
|
||||||
ObjectLibrary->ConditionalBeginDestroy();
|
ObjectLibrary->ConditionalBeginDestroy();
|
||||||
GEngine->ForceGarbageCollection(true);
|
#if WITH_EDITOR
|
||||||
|
GetWorld()->ForceGarbageCollection(true);
|
||||||
|
#endif
|
||||||
ActorsToConsider.Reset();
|
ActorsToConsider.Reset();
|
||||||
if (SpectatorAsEgo && Spectator)
|
if (SpectatorAsEgo && Spectator)
|
||||||
{
|
{
|
||||||
|
@ -1059,6 +1060,7 @@ void ALargeMapManager::DumpTilesTable() const
|
||||||
|
|
||||||
void ALargeMapManager::PrintMapInfo()
|
void ALargeMapManager::PrintMapInfo()
|
||||||
{
|
{
|
||||||
|
#if WITH_EDITOR
|
||||||
UWorld* World = GetWorld();
|
UWorld* World = GetWorld();
|
||||||
|
|
||||||
FDVector CurrentActorPosition;
|
FDVector CurrentActorPosition;
|
||||||
|
@ -1117,6 +1119,7 @@ void ALargeMapManager::PrintMapInfo()
|
||||||
if (LastMsgIndex > MaxClientLocMsgIndex) break;
|
if (LastMsgIndex > MaxClientLocMsgIndex) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALargeMapManager::ConsiderSpectatorAsEgo(bool _SpectatorAsEgo)
|
void ALargeMapManager::ConsiderSpectatorAsEgo(bool _SpectatorAsEgo)
|
||||||
|
|
|
@ -169,7 +169,10 @@ UOpenDriveMap *UOpenDrive::LoadOpenDriveMap(const FString &MapName)
|
||||||
|
|
||||||
UOpenDriveMap *UOpenDrive::LoadCurrentOpenDriveMap(const UObject *WorldContextObject)
|
UOpenDriveMap *UOpenDrive::LoadCurrentOpenDriveMap(const UObject *WorldContextObject)
|
||||||
{
|
{
|
||||||
UWorld *World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
|
UWorld *World = nullptr;
|
||||||
|
#if WITH_EDITOR
|
||||||
|
GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
|
||||||
|
#endif
|
||||||
return World != nullptr ?
|
return World != nullptr ?
|
||||||
LoadOpenDriveMap(World->GetMapName()) :
|
LoadOpenDriveMap(World->GetMapName()) :
|
||||||
nullptr;
|
nullptr;
|
||||||
|
|
|
@ -799,7 +799,11 @@ void FCarlaServer::FPimpl::BindActions()
|
||||||
result.Contains(FString(TEXT("Error")))
|
result.Contains(FString(TEXT("Error")))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return GEngine->Exec(Episode->GetWorld(), UTF8_TO_TCHAR(cmd.c_str()));
|
bool success = false;
|
||||||
|
#if WITH_EDITOR
|
||||||
|
success = GEngine->Exec(Episode->GetWorld(), UTF8_TO_TCHAR(cmd.c_str()));
|
||||||
|
#endif
|
||||||
|
return success;
|
||||||
};
|
};
|
||||||
|
|
||||||
BIND_SYNC(get_sensor_token) << [this](carla::streaming::detail::stream_id_type sensor_id) ->
|
BIND_SYNC(get_sensor_token) << [this](carla::streaming::detail::stream_id_type sensor_id) ->
|
||||||
|
|
Loading…
Reference in New Issue