fix the non-editor build issues caused by the recent motion sources refactor

This commit is contained in:
Mamadou Babaei
2025-02-14 12:11:13 +01:00
parent 6f9f0c55b6
commit 31e03380c9
4 changed files with 36 additions and 5 deletions
@@ -37,14 +37,21 @@
#include "Containers/Array.h"
#include "Engine/Engine.h"
#if WITH_EDITOR
#include "PropertyEditorModule.h"
#endif /* WITH_EDITOR */
#include "UObject/NameTypes.h"
#include "UObject/Object.h"
#include "UObject/Package.h"
#include "UObject/UObjectGlobals.h"
#include "SGLog/SGLog.h"
#if WITH_EDITOR
#include "SGSettings/SGWristTrackingDetailsCustomization.h"
#endif /* WITH_EDITOR */
struct USGSettings::FImpl
{
@@ -119,7 +126,9 @@ void USGSettings::Initialize(FSubsystemCollectionBase& Collection)
Super::Initialize(Collection);
#if WITH_EDITOR
Pimpl->RegisterCustomPropertyTypeLayouts();
#endif /* WITH_EDITOR */
SGLOG("The SenseGlove settings singleton has been successfully initialized with the engine lifetime!");
}
@@ -130,7 +139,9 @@ void USGSettings::Deinitialize()
Super::Deinitialize();
#if WITH_EDITOR
Pimpl->UnregisterCustomPropertyTypeLayouts();
#endif /* WITH_EDITOR */
(void) Pimpl.Release();
@@ -142,6 +153,7 @@ USGSettings::FImpl::FImpl(USGSettings* InOwner)
{
}
#if WITH_EDITOR
void USGSettings::FImpl::RegisterCustomPropertyTypeLayouts()
{
SGLOG("Registering SGSettings custom property type layouts...");
@@ -167,6 +179,7 @@ void USGSettings::FImpl::UnregisterCustomPropertyTypeLayouts()
SGLOG("Unregistering SGSettings custom property type layout", GetWristTrackingSettingsPropertyName());
PropertyEditorModule.UnregisterCustomPropertyTypeLayout(GetWristTrackingSettingsPropertyName());
}
#endif /* WITH_EDITOR */
USGSettings::FImpl::~FImpl() = default;
@@ -33,6 +33,8 @@
*/
#if WITH_EDITOR
#include "SGSettings/SGWristTrackingDetailsCustomization.h"
#include "IMotionController.h"
@@ -215,4 +217,6 @@ FSGWristTrackingDetailsCustomization::FImpl::~FImpl() = default;
void FSGWristTrackingDetailsCustomization::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
}
#endif /* WITH_EDITOR */
@@ -33,8 +33,11 @@
*/
#pragma once
#if WITH_EDITOR
#include "DetailWidgetRow.h"
#include "IDetailChildrenBuilder.h"
#include "IPropertyTypeCustomization.h"
@@ -71,4 +74,6 @@ private:
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
};
};
#endif /* WITH_EDITOR */
@@ -50,12 +50,21 @@ public class SenseGloveSettings : ModuleRules
"Engine",
"HeadMountedDisplay",
"InputCore",
"PropertyEditor",
"Slate",
"SlateCore",
}
);
if (Target.bBuildEditor)
{
PrivateDependencyModuleNames.AddRange(
new string[]
{
"PropertyEditor",
"Slate",
"SlateCore",
}
);
}
PrivateIncludePathModuleNames.AddRange(
new string[]
{