dotnet-algorand-sdk
dotnet-algorand-sdk copied to clipboard
Tesing Algorand SDK on Unity Android: "ApiException: Operation is not supported on this platform."
Hi, I want to use dotnet-algorand-sdk to develope a multiplatform game in Unity that works on Android, iOS and Standalone PC. on windows platform everything is ok but after building for android and testing on device, I get the following error :
2021-11-01 12:04:37.721 7115-7250/? E/Unity: ApiException: Operation is not supported on this platform. at Algorand.Client.ApiClient.Deserialize (RestSharp.IRestResponse response, System.Type type) [0x0018c] in
:0 at Algorand.V2.Algod.DefaultApi.TransactionParamsWithHttpInfo () [0x00162] in :0 at Algorand.V2.Algod.DefaultApi.TransactionParams () [0x00000] in :0 at AlgorandManager.PayPlayerwithAlgorandFunction () [0x00087] in :0 Rethrow as Exception: Could not get params at AlgorandManager.PayPlayerwithAlgorandFunction () [0x000a0] in :0 at Init.MakeTransaction () [0x0000f] in :0 at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in <58ded747c1794c60a2531ce56044a432>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in <58ded747c1794c60a2531ce56044a432>:0 at UnityEngine.UI.Button.Press () [0x0001c] in <46205c1946f1470
Is there any way that I can make it work on mobile platforms or because it uses .NET libraries it's impossible?
I like to mention that I used .NET libraries like Websocket-sharp before in these platforms and they work perfectly.
Thanks.
@emaadgh I believe it is possible, but perhaps faster to use: https://github.com/CareBoo/unity-algorand-sdk
I am guessing it is possible. Xamarin deploys to Android. So, whatever they did to make that work could work here. Mono project.
@rfustino Thanks Russ, I like to make this repository work for mobile platforms in Unity.
So about Xamarin, do they use this exact SDK in Xamarin directly? or there is another one that I should look to it?
Any other suggestion on how I can make this work will be appreciated.
Yes @emaadgh . The exact SDK is used. It is .NET 2.0 compliant so should work cross platform. Are you still getting this error or have you started using the Unity SDK? If you started using https://github.com/CareBoo/unity-algorand-sdk please let me know o your experience. I will be reviewing that next week. :)