Skip to content

Commit

Permalink
fix: bindings for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Jan 30, 2024
1 parent 0efbc43 commit 29e7800
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Assets/Dojo/Runtime/Starknet/StarknetInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Newtonsoft.Json;
using Debug = UnityEngine.Debug;

#if UNITY_WEBGL && !UNITY_EDITOR
namespace Dojo.Starknet {
public class StarknetInterop {
[DllImport("__Internal")]
Expand Down Expand Up @@ -116,4 +117,5 @@ public static Task<bool> WaitForTransactionAsync(IntPtr provider, FieldElement t
[DllImport("__Internal")]
public static extern bool Verify(CString publicKey, CString hash, CString r, CString s);
}
}
}
#endif
4 changes: 3 additions & 1 deletion Assets/Dojo/Runtime/Torii/ToriiWasmClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Newtonsoft.Json;
using UnityEngine;

#if UNITY_WEBGL && !UNITY_EDITOR
namespace Dojo.Torii
{
public class ToriiWasmClient
Expand Down Expand Up @@ -53,4 +54,5 @@ public async Task<byte[]> PublishMessage(string topic, byte[] data)
return await ToriiWasmInterop.PublishMessageAsync(clientPtr, topic, data);
}
}
}
}
#endif
4 changes: 3 additions & 1 deletion Assets/Dojo/Runtime/Torii/ToriiWasmInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Linq;
using Newtonsoft.Json.Linq;

#if UNITY_WEBGL && !UNITY_EDITOR
namespace Dojo.Torii
{
[Serializable]
Expand Down Expand Up @@ -234,4 +235,5 @@ public static void OnMessage(IntPtr clientPtr)
OnMessage(clientPtr, OnMessageHelper.Callback);
}
}
}
}
#endif
3 changes: 3 additions & 0 deletions Assets/Dojo/Runtime/WorldManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public class WorldManager : MonoBehaviour
public string worldAddress;
public SynchronizationMaster synchronizationMaster;
public ToriiClient toriiClient;

#if UNITY_WEBGL && !UNITY_EDITOR
public ToriiWasmClient wasmClient;
#endif

async void Awake()
{
Expand Down

0 comments on commit 29e7800

Please sign in to comment.