move the defaults to the constructor

This commit is contained in:
Mamadou Babaei
2023-03-21 15:01:44 +01:00
parent 62580996af
commit 4d3f9881e2
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
{