Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,17 @@ FPropertyAccess::Result FBlueprintComponentReferenceCustomization::GetValue(FBlu
{
// Potentially accessing the value while garbage collecting or saving the package could trigger a crash.
// so we fail to get the value when that is occurring.
if (GIsSavingPackage || IsGarbageCollecting())
{
return FPropertyAccess::Fail;
}
#if UE_VERSION_OLDER_THAN(5, 8, 0)
if (GIsSavingPackage || IsGarbageCollecting())
{
return FPropertyAccess::Fail;
}
#else
if (UE::IsSavingPackage() || IsGarbageCollecting())
{
return FPropertyAccess::Fail;
}
#endif

FPropertyAccess::Result Result = FPropertyAccess::Fail;
if (PropertyHandle.IsValid() && PropertyHandle->IsValidHandle())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ void FBCREditorModule::StartupModule()
{
ClassHelper = MakeShared<FBlueprintComponentReferenceHelper>();

// PostEngineInitHandle = FCoreDelegates::OnPostEngineInit.AddRaw(this, &FBCREditorModule::OnPostEngineInit);
#if UE_VERSION_OLDER_THAN(5, 8, 0)
PostEngineInitHandle = FCoreDelegates::OnPostEngineInit.AddRaw(this, &FBCREditorModule::OnPostEngineInit);
#else
PostEngineInitHandle = FCoreDelegates::GetOnPostEngineInit().AddRaw(this, &FBCREditorModule::OnPostEngineInit);
#endif
}
}

void FBCREditorModule::OnPostEngineInit()
{
FCoreDelegates::OnPostEngineInit.Remove(PostEngineInitHandle);
#if UE_VERSION_OLDER_THAN(5, 8, 0)
FCoreDelegates::OnPostEngineInit.Remove(PostEngineInitHandle);
#else
FCoreDelegates::GetOnPostEngineInit().Remove(PostEngineInitHandle);
#endif

#if !UE_VERSION_OLDER_THAN(5, 0, 0)
OnReloadCompleteDelegateHandle = FCoreUObjectDelegates::ReloadCompleteDelegate.AddRaw(this, &FBCREditorModule::OnReloadComplete);
Expand Down Expand Up @@ -96,7 +105,12 @@ void FBCREditorModule::ShutdownModule()
{
if (GIsEditor && !IsRunningCommandlet())
{
#if UE_VERSION_OLDER_THAN(5, 8, 0)
FCoreDelegates::OnPostEngineInit.Remove(PostEngineInitHandle);
#else
FCoreDelegates::GetOnPostEngineInit().Remove(PostEngineInitHandle);
#endif

#if !UE_VERSION_OLDER_THAN(5, 0, 0)
FCoreUObjectDelegates::ReloadCompleteDelegate.Remove(OnReloadCompleteDelegateHandle);
FCoreUObjectDelegates::ReloadReinstancingCompleteDelegate.Remove(OnReloadReinstancingCompleteDelegateHandle);
Expand Down