Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Source/UnrealMLAgents/Private/Academy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#include "UnrealMLAgents/Academy.h"

#if WITH_EDITOR
#include "Editor/EditorEngine.h"
#include "Editor.h"
#include "Editor/EditorEngine.h"
#endif

#include "GenericPlatform/GenericPlatformMisc.h"
Expand Down Expand Up @@ -222,7 +221,10 @@ void UAcademy::Dispose()

void UAcademy::Dispose(bool bIsSimulating)
{

FCoreDelegates::OnExit.RemoveAll(this);
#if WITH_EDITOR
FEditorDelegates::EndPIE.RemoveAll(this);
#endif
if (BoundBridge.IsValid())
{
BoundBridge->OnFixedStep.RemoveDynamic(this, &UAcademy::HandleFixedStep);
Expand Down
8 changes: 4 additions & 4 deletions Source/UnrealMLAgents/UnrealMLAgents.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ public UnrealMLAgents(ReadOnlyTargetRules Target) : base(Target)
PublicDependencyModuleNames.AddRange(
new string[] { "Core", "CoreUObject", "Engine", "SimCadenceRuntime" });

PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore", "Projects" });

if (Target.bBuildEditor)
{
PrivateDependencyModuleNames.Add("SimCadenceEditor");
PublicDefinitions.Add("WITH_SIMCADENCE_EDITOR=1");
PrivateDependencyModuleNames.Add("UnrealEd");
PublicDefinitions.Add("WITH_UNREALED=1");
}
else
{
PublicDefinitions.Add("WITH_SIMCADENCE_EDITOR=0");
PublicDefinitions.Add("WITH_UNREALED=0");
}

AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenSSL");
Expand Down
Loading