Skip to content

Commit 724529c

Browse files
committed
fix: Compilation issues for < Unity Version
1 parent f28c661 commit 724529c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Runtime/Client/LootLockerHTTPClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ private void HandleSessionRefreshResult(LootLockerResponse newSessionResponse, s
697697
return;
698698
}
699699
var playerData = LootLockerStateData.GetStateForPlayerOrDefaultStateOrEmpty(executionItem.RequestData.ForPlayerWithUlid);
700-
string tokenBeforeRefresh = executionItem.RequestData.ExtraHeaders.GetValueOrDefault("x-session-token", "");
700+
string tokenBeforeRefresh = executionItem.RequestData.ExtraHeaders.TryGetValue("x-session-token", out var existingToken) ? existingToken : "";
701701
string tokenAfterRefresh = playerData?.SessionToken;
702702
if (string.IsNullOrEmpty(tokenAfterRefresh) || tokenBeforeRefresh.Equals(playerData.SessionToken))
703703
{

Runtime/Editor/LogViewer/LootLockerLogViewerUI.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,11 @@ private Foldout CreateJsonFoldout(string title, string jsonContent)
446446

447447
var jsonField = new TextField { value = prettifiedJson, isReadOnly = true, multiline = true };
448448
jsonField.AddToClassList("log-message-field");
449-
jsonField.style.whiteSpace = WhiteSpace.PreWrap;
449+
#if UNITY_6000_0_OR_NEWER
450+
jsonField.style.whiteSpace = WhiteSpace.PreWrap;
451+
#else
452+
jsonField.style.whiteSpace = WhiteSpace.Normal;
453+
#endif
450454
jsonContainer.Add(jsonField);
451455

452456
foldout.RegisterValueChangedCallback(evt =>

0 commit comments

Comments
 (0)