@@ -50,7 +50,7 @@ public Model(string name, Dictionary<string, WasmValue> members)
50
50
51
51
Members = members . ToDictionary ( k => k . Key , v => HandleWasmValue ( v . Value ) ) ;
52
52
}
53
- #else
53
+ #endif
54
54
55
55
public Model ( string name , Dictionary < string , object > members )
56
56
{
@@ -100,6 +100,7 @@ private object HandleCValue(dojo.Ty ty)
100
100
} ;
101
101
}
102
102
103
+ #if UNITY_WEBGL && ! UNITY_EDITOR
103
104
private object HandleWasmValue ( WasmValue value )
104
105
{
105
106
return value . type . ToLower ( ) switch
@@ -147,7 +148,7 @@ private object HandleWasmValue(WasmValue value)
147
148
_ => throw new Exception ( "Unknown type: " + value . type )
148
149
} ;
149
150
}
150
-
151
+ #endif
151
152
private byte [ ] hexStringToByteArray ( string hex )
152
153
{
153
154
// Remove "0x" prefix if present
@@ -181,6 +182,7 @@ private Enum HandleCEnum(dojo.Enum en)
181
182
return new Enum ( en . name , option . name , HandleCValue ( option . ty ) ) ;
182
183
}
183
184
185
+ #if UNITY_WEBGL && ! UNITY_EDITOR
184
186
private Struct HandleJSStruct ( string name , Dictionary < string , WasmValue > str )
185
187
{
186
188
return new Struct ( name , str . Select ( m => new KeyValuePair < string , object > ( m . Key , HandleWasmValue ( m . Value ) ) ) . ToDictionary ( k => k . Key , v => v . Value ) ) ;
@@ -190,7 +192,7 @@ private Enum HandleJSEnum(string name, WasmEnum en)
190
192
{
191
193
return new Enum ( name , en . option , HandleWasmValue ( en . value ) ) ;
192
194
}
193
-
195
+ #endif
194
196
private BigInteger ConvertTwosComplementToBigInteger ( byte [ ] bytes , bool unsigned = false , int bits = 128 )
195
197
{
196
198
var reversed = bytes . Reverse ( ) . ToArray ( ) ;
0 commit comments