77#if ENGINE_MAJOR_VERSION >= 5
78 return std::regex_match(TCHAR_TO_UTF8(*str), SemverPattern);
103#if ENGINE_MAJOR_VERSION >= 5
104 inline static const FString
PreConfigFileName = TEXT(
"LootLockerPreConfig.bytes");
110 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override
112 if (PropertyChangedEvent.GetPropertyName() ==
"GameVersion")
116 if (PropertyChangedEvent.GetPropertyName() ==
"bEnableFileLogging" || PropertyChangedEvent.GetPropertyName() ==
"LogFileName")
128 UObject::PostEditChangeProperty(PropertyChangedEvent);
134 MigrateSettingsIfNeeded();
136 ApplyFileConfigIfPresent();
139 if (!bIsFileConfigLocked)
150 UObject::PostInitProperties();
153 UPROPERTY(Config, VisibleAnywhere, BlueprintReadOnly, Category =
"LootLocker", Meta = (EditCondition =
"IsOutdatedSDK", EditConditionHides), Meta = (MultiLine =
true), Meta = (DisplayName =
"WARNING:"), Transient)
154 FString
OutdatedSDKWarning =
"This version of LootLocker is no longer updated through fab because of fab guidelines. Please use GitHub releases to update: https://github.com/lootlocker/unreal-sdk/releases";
155 UPROPERTY(Config, VisibleAnywhere, BlueprintReadOnly, Category =
"LootLocker", Meta = (EditCondition =
"bIsFileConfigLocked", EditConditionHides), Meta = (MultiLine = true), Meta = (DisplayName =
"INFO:"), Transient)
156 FString
FileConfigActiveNotice =
"Settings are governed by the pre-configured file config shipped with the plugin and cannot be changed from the editor.";
158 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker", Meta = (DisplayName =
"LootLocker API Key", EditCondition =
"!bIsFileConfigLocked"))
160 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker", Meta = (EditCondition =
"!bIsFileConfigLocked"))
162 UPROPERTY(Config, VisibleAnywhere, BlueprintReadOnly, Category =
"LootLocker", Meta = (EditCondition =
"!IsValidGameVersion", EditConditionHides), Meta = (MultiLine = true), Meta = (DisplayName =
"WARNING:"), Transient)
163 FString
InvalidGameVersionWarning =
"Game version needs to follow a numeric Semantic Versioning pattern: X.Y.Z.B with the sections denoting MAJOR.MINOR.PATCH.BUILD and the last two being optional. Read more at https://docs.lootlocker.com/the-basics/core-concepts/glossary#game-version";
164 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker", Meta = (EditCondition =
"!bIsFileConfigLocked"))
167 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker", Meta = (EditCondition =
"!bIsFileConfigLocked"))
174 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker", Meta = (DisplayName =
"Use Legacy HTTP Stack", EditCondition =
"!bIsFileConfigLocked"))
177 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Logging", Meta = (EditCondition =
"!bIsFileConfigLocked"))
179 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Logging", Meta = (DisplayName =
"LootLocker Log Level", EditCondition =
"!bIsFileConfigLocked"))
188 return GetDefault<ULootLockerConfig>()->LogOutsideOfEditor;
195 return GetDefault<ULootLockerConfig>()->LootLockerLogLevel;
201 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
206 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
212 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
217 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
222 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
227 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Logging")
237 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Presence")
243 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Presence")
249 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Presence")
255 UFUNCTION(BlueprintCallable, Category =
"LootLocker|Presence")
258 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Logging", Meta = (DisplayName =
"Enable File Logging", EditCondition =
"!bIsFileConfigLocked"))
260 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Logging", Meta = (DisplayName =
"Name of LootLocker Log File", EditCondition =
"bEnableFileLogging && !bIsFileConfigLocked", EditConditionHides))
262 UPROPERTY(Config, VisibleAnywhere, BlueprintReadOnly, Category =
"LootLocker|Logging", Meta = (EditCondition =
"bEnableFileLogging", EditConditionHides), Meta = (MultiLine = true), Meta = (DisplayName =
"Actual Log File (on current device)"), Transient)
270 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Presence", Meta = (DisplayName =
"Enable Presence System", EditCondition =
"!bIsFileConfigLocked"))
274 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Presence", Meta = (DisplayName =
"Auto-Connect on Session Start", EditCondition =
"bEnablePresence && !bIsFileConfigLocked", EditConditionHides))
278 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Presence", Meta = (DisplayName =
"Auto-Disconnect on Focus Loss", EditCondition =
"bEnablePresence && !bIsFileConfigLocked", EditConditionHides))
282 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Presence", Meta = (DisplayName =
"Enable In Editor", EditCondition =
"bEnablePresence && !bIsFileConfigLocked", EditConditionHides))
302 UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category =
"LootLocker|Multi User", Meta = (DisplayName =
"Multi User Session Mode", EditCondition =
"!bIsFileConfigLocked"))
305 FString LogFilePath =
"";
306 UPROPERTY(Config, VisibleInstanceOnly, Meta = (EditCondition =
"false", EditConditionHides), Transient, Category =
"LootLocker")
307 bool IsValidGameVersion = true;
308 UPROPERTY(Config, VisibleInstanceOnly, Meta = (EditCondition =
"false", EditConditionHides), Transient, Category =
"LootLocker")
309 bool bIsFileConfigLocked = false;
310#if ENGINE_MAJOR_VERSION >= 5
311 inline static bool bFileConfigChecked =
false;
312 inline static TOptional<FLootLockerFileConfig> FileConfig;
314 static bool bFileConfigChecked;
315 static TOptional<FLootLockerFileConfig> FileConfig;
317 UPROPERTY(Config, VisibleInstanceOnly, Meta = (EditCondition =
"false", EditConditionHides), Transient, Category =
"LootLocker")
319#ifdef LOOTLOCKER_SHOW_OUTDATED_SDK_MESSAGE
325#if ENGINE_MAJOR_VERSION >= 5
326 inline static const std::regex SemverPattern = std::regex(
"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*))?(?:\\.(0|[1-9]\\d*))?$" );
333 void MigrateSettingsIfNeeded();
335 static void LoadFileConfig();
336 void ApplyFileConfigIfPresent();