@@ -25,6 +25,8 @@ public class WebAWSDynamoDB : DataHandler
25
25
[ SubjectNerd . Utilities . EditScriptable ]
26
26
public AWSCredentials credentials ;
27
27
28
+ #if UNITY_WEBGL
29
+
28
30
[ DllImport ( "__Internal" ) ]
29
31
private static extern void DDB_Setup ( string region , string identityPool , string callbackGameObjectName ) ;
30
32
@@ -45,6 +47,22 @@ public class WebAWSDynamoDB : DataHandler
45
47
46
48
[ DllImport ( "__Internal" ) ]
47
49
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
+
48
66
49
67
private const string primaryKey = "ppid_session_dataname" ;
50
68
private const string sortKey = "trial_num" ;
0 commit comments