move the defaults to the constructor

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