Skip to content

Commit 01ca7c5

Browse files
committed
fix streamingassetserror
1 parent 79dd4dc commit 01ca7c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/UXF/Scripts/UI/ExperimentProfileSelector.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ void Start()
3737

3838
public void Populate(bool retry = true)
3939
{
40+
if (!Directory.Exists(Application.streamingAssetsPath))
41+
{
42+
Debug.LogWarning("StreamingAssets folder was moved or deleted! Creating a new one.");
43+
Directory.CreateDirectory(Application.streamingAssetsPath);
44+
}
45+
4046
var profileNames = Directory.GetFiles(Application.streamingAssetsPath, uiController.settingsSearchPattern)
4147
.Select(f => Path.GetFileName(f))
4248
.ToList();

0 commit comments

Comments
 (0)