@@ -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" ;
0 commit comments