Skip to content

Commit de22fc4

Browse files
Added a guard as per issue nr 33
robertohuertasm#33 (comment)
1 parent bf660bc commit de22fc4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Example_unity5/Assets/Scripts/DataService.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ public DataService(string DatabaseName){
3939
File.Copy(loadDb, filepath);
4040

4141
#elif UNITY_WINRT
42-
var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
43-
// then save to Application.persistentDataPath
44-
File.Copy(loadDb, filepath);
42+
var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
43+
// then save to Application.persistentDataPath
44+
File.Copy(loadDb, filepath);
45+
#else
46+
var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
47+
// then save to Application.persistentDataPath
48+
File.Copy(loadDb, filepath);
49+
4550
#endif
4651

4752
Debug.Log("Database written");

0 commit comments

Comments
 (0)