Skip to content

Commit 769da3d

Browse files
JohannesLootkristijan-ujevic
authored andcommitted
- Downloaded text is now put into textbox
- Uploaded text is now fetched from text input
1 parent 527b179 commit 769da3d

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Samples~/LootLockerExamples/Scenes/7 - PlayerFiles.unity

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ MonoBehaviour:
249249
m_EditorClassIdentifier:
250250
informationText: {fileID: 1312418106}
251251
availablePlayerFilesText: {fileID: 1690107264}
252-
playerFilesTextContent: {fileID: 1214373701}
252+
playerFilesTextContent: {fileID: 1076014855}
253+
playerFilesTextPlaceholder: {fileID: 1214373701}
253254
saveOnDisk: 0
254255
fileIdUploadInput: {fileID: 1720643739}
255256
fileIdDownloadInput: {fileID: 2051800220}
@@ -900,7 +901,7 @@ MonoBehaviour:
900901
m_HandleRect: {fileID: 111827319}
901902
m_Direction: 2
902903
m_Value: 1
903-
m_Size: 1
904+
m_Size: 0.9960471
904905
m_NumberOfSteps: 0
905906
m_OnValueChanged:
906907
m_PersistentCalls:
@@ -1999,7 +2000,7 @@ RectTransform:
19992000
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
20002001
m_AnchorMin: {x: 0, y: 0}
20012002
m_AnchorMax: {x: 1, y: 0.5}
2002-
m_AnchoredPosition: {x: 8.501343, y: 65.43576}
2003+
m_AnchoredPosition: {x: 8.501343, y: 63.565052}
20032004
m_SizeDelta: {x: 16.070007, y: 0}
20042005
m_Pivot: {x: 0.5, y: 0.5}
20052006
--- !u!222 &1312418105

Samples~/LootLockerExamples/Scripts/PlayerFiles.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public class PlayerFiles : MonoBehaviour
1313
{
1414
public Text informationText;
1515
public Text availablePlayerFilesText;
16-
public Text playerFilesTextContent;
16+
public InputField playerFilesTextContent;
17+
public Text playerFilesTextPlaceholder;
1718

1819
// Enable this to save the file on the disk as well as uploading it to LootLocker
1920
public bool saveOnDisk;
@@ -87,7 +88,8 @@ public void GetPlayerFileContent()
8788
StartCoroutine(Download(response.url, (fileContent) =>
8889
{
8990
informationText.text += "Got player file content" + "\n";
90-
playerFilesTextContent.text = fileContent;
91+
playerFilesTextContent.text = "";
92+
playerFilesTextPlaceholder.text = fileContent;
9193
}));
9294
}
9395
else
@@ -114,7 +116,7 @@ IEnumerator Download(string url, System.Action<string> fileContent)
114116
}
115117
else
116118
{
117-
// Show results as text
119+
// Show results as text
118120
Debug.Log(www.downloadHandler.text);
119121
fileContent(www.downloadHandler.text);
120122
}
@@ -231,7 +233,6 @@ public void DeleteFile()
231233
{
232234
informationText.text += "Error" + response.Error + "\n";
233235
}
234-
GetPlayerFiles();
235236
});
236237
}
237238

0 commit comments

Comments
 (0)