Skip to content

Commit 81106d5

Browse files
authored
Merge pull request #120 from immersivecognition/personal/jack/2022-improvements
platform dependent compile on AWS JS plugin
2 parents e689320 + 34369c6 commit 81106d5

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Assets/UXF/Scripts/DataHandling/WebAWSDynamoDB.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public class WebAWSDynamoDB : DataHandler
2525
[SubjectNerd.Utilities.EditScriptable]
2626
public AWSCredentials credentials;
2727

28+
#if UNITY_WEBGL
29+
2830
[DllImport("__Internal")]
2931
private static extern void DDB_Setup(string region, string identityPool, string callbackGameObjectName);
3032

@@ -45,6 +47,22 @@ public class WebAWSDynamoDB : DataHandler
4547

4648
[DllImport("__Internal")]
4749
private static extern string GetUserInfo();
50+
#else
51+
private static void DDB_Setup(string region, string identityPool, string callbackGameObjectName) => Error();
52+
private static void DDB_CreateTable(string tableName, string primaryKeyName, string sortKeyName, string callbackGameObjectName) => Error();
53+
private static void DDB_PutItem(string tableName, string jsonItem, string callbackGameObjectName) => Error();
54+
private static void DDB_BatchWriteItem(string tableName, string jsonRequests, string callbackGameObjectName) => Error();
55+
private static void DDB_GetItem(string tableName, string jsonItem, string callbackGameObjectName, string guid) => Error();
56+
private static void DDB_Cleanup() => Error();
57+
private static string GetUserInfo() => Error();
58+
59+
private static string Error()
60+
{
61+
throw new InvalidProgramException("WebAWSDynamoDB is not supported on this platform.");
62+
}
63+
64+
#endif
65+
4866

4967
private const string primaryKey = "ppid_session_dataname";
5068
private const string sortKey = "trial_num";

Assets/UXF/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.2
1+
2.4.3

0 commit comments

Comments
 (0)