move the defaults to the constructor

This commit is contained in:
Mamadou Babaei
2023-03-28 10:39:11 +02:00
parent dc5fa338dc
commit cb3fa3ccbe
2 changed files with 11 additions and 1 deletions
@@ -81,6 +81,13 @@ void USGSettings::FImplDeleter::operator()(const FImpl* P) const
delete P;
}
USGSettings::USGSettings()
{
HardwareOffset = ESGPositionalTrackingHardware::None;
HardwareLocationOffset = FVector::ZeroVector;
HardwareRotationOffset = FRotator::ZeroRotator;
}
bool USGSettings::ShouldCreateSubsystem(UObject* Outer) const
{
return true;
@@ -94,7 +101,7 @@ void USGSettings::Initialize(FSubsystemCollectionBase& Collection)
Pimpl = TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter);
HardwareOffset = ESGPositionalTrackingHardware::None;
SGLOG("Initializing the SenseGlove settings singleton with the engine lifetime...");
SGLOG("The SenseGlove settings singleton has been successfully initialized with the engine lifetime!");
}
@@ -66,6 +66,9 @@ private:
UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking")
ESGPositionalTrackingHardware HardwareOffset;
public:
USGSettings();
public:
FORCEINLINE ESGPositionalTrackingHardware GetHardwareOffset() const
{