Giter Site home page Giter Site logo

trilitech / tezos-unity-sdk Goto Github PK

View Code? Open in Web Editor NEW
24.0 5.0 14.0 58.81 MB

Tezos Unity SDK for developers. Discover the future of Web3 gaming.

Home Page: https://tezos.com/unity

License: MIT License

JavaScript 0.85% C# 77.01% Mathematica 14.79% HTML 0.66% TypeScript 6.68%
blockchain crytpo dapp defi gaming nft tezos unity upm web3

tezos-unity-sdk's People

Contributors

abhishektrili avatar alexandrosgounis avatar birdboybolu avatar efetez avatar fraidev avatar johnjoubert avatar k-karuna avatar m-kus avatar mathias-hiron avatar mismirnov avatar oskar-ziller avatar timothymcmackin avatar umutkutlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tezos-unity-sdk's Issues

Separate SDK Concerns from "Demo Example" Concerns

The repo contains a Unity Project.

In the Assets Folder, there are folders and files that relate to 2 concerns...

Concerns

  1. SDK
  2. Demo Example and related files

image

Suggestion

  • Separate (e.g. remove) the "Demo Example.unity" Scene and all related files. This will indicate to users who want to bring the SDK functionality into production which files are needed (e.g. SDK) and which files are not (e.g. Demo Example)

Solution Paths to Suggestion, Either

  1. If #10 is accepted, completed, and merged beforehand (recommended). Then the "Demo Example.unity" and its related files are to be moved to the "Samples~" of the Unity UPM-Compatible Package Structure (link)
  2. Otherwise, make sibling folders within /assets/ to clearly separate the 2 concerns. Such that users can delete the examples without compilation errors.

NOTE: Currently any/all prefabs related to the "QR code functionality" are within "DemoExample". Separately I'll suggest how to address that.

TAG
#PriorityForSam

Newtonsoft dependency missing on IOS

It is needed to add Newtonsoft dependency manually to build on IOS.

We already have the dependency as a DLL for WebGL, we just need to enable it to IOS as well.

Bug Reporting tool in Unity Editor

To collect bug reports from the users, I think we should add a convenient way, without having to visit an external link or platform.

  • I have tried an example to show you what it could look like:
Screenshot 2023-05-10 at 14 19 01

The most ideal would be connecting this prompt to our Asana board and gather all the feedbacks under "Reported Bugs" section. It would help us to filter all the bugs reported and open issues for high-priority ones, as well as keep a record of what's been reported so far.

Inventory sample game contract issue

After compiling the jsligo files, the resulting michelson contract has errors and cannot be deployed.

The error is "invalid primitive name".
image_720

(I encountered this issue because I'd like to modify the jsligo contract and the Unity project for a school/personal project)

Marketplace is not getting loaded on WebGL

Definition

Marketplace is not getting loaded on WebGL.

WebGLMarketPanelStuck

Steps To Reproduce

  1. Create a new unity project
  2. Import the sdk from package manager
  3. Install the sample
  4. Go to WebGLFrontend/output and copy the StreamingAssets and WebGLTemplates folders. Navigate to the Assets folder and paste copied folders.
  5. Switch platform to WebGL
  6. Uncheck Auto Graphics API from ProjectSettings/Player/Other Settings
  7. Choose Airgap WebGL Template from ProjectSettings/Player/Resolution and Presentation
  8. Build the project to WebGL
  9. Connect your wallet
  10. Click MARKET button to load Market Panel

Possible Solution

Repo - Publish To NPMJS

After this one

Then do

  • Published the repo package to some package registry. A popular one is NPMJS. Info and benefits are here (link)

WebGL: failed to import and connect to temple

  1. When trying to import 1.3.1:
Library\PackageCache\com.trilitech.tezos-unity-sdk@a5b7a15f52\Runtime\Scripts\BeaconSDK\BeaconConnectorWebGl.cs(12,38): error CS0535: 'BeaconConnectorWebGl' does not implement interface member 'IBeaconConnector.RequestTezosSignPayload(SignPayloadType, string)'

Workaround: change enum type to int

  1. When trying to connect to Temple: stays as operation loading and does not prompt for wallet connection.

Beacon SDK Crash

There is an important crash in the Beacon SDK that affects some of the users.

image

`Crash: it.airgap.beaconsdk.core.internal.utils.ErrorKt.failWith
java.lang.Error
Sample attributes:
realme RMX3231 (RMX3231)
Android 11 (SDK 30)
Version: 35 (1.0.0.10)Occurred: 2 days ago

Exception java.lang.Error: FATAL EXCEPTION [DefaultDispatcher-worker-6]
Unity version : 2021.3.20f1
Device model : realme RMX3231
Device fingerprint: realme/RMX3231/RMX3231:11/RP1A.201005.001/1675674151082:user/release-keys
Build Type : Release
Scripting Backend : IL2CPP
ABI : armeabi-v7a
Strip Engine Code : true
Caused by: it.airgap.beaconsdk.core.exception.InternalException: No reachable Matrix node found.
at it.airgap.beaconsdk.core.internal.utils.ErrorKt.failWith (Error.kt:18)
at it.airgap.beaconsdk.core.internal.utils.ErrorKt.failWith$default (Error.kt:16)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.failWithUnreachableNodes (P2pMatrixStore.kt:164)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.relayServer-IoAF18A (P2pMatrixStore.kt:152)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.access$relayServer-IoAF18A (P2pMatrixStore.kt:18)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore$relayServer$1.invokeSuspend
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith (SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith (SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith (SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith (SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith (SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith (SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith (SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith (SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith (SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith (SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith (SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith (SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith (SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith (SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith (SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:664)`

Sharing the logs of the app while it crashes below, Crashlytics:

`# Crashlytics - Stack trace

Application: com.golivegames.cricketstar

Platform: android

Version: 1.0.0.16 (51)

Issue: b9a4512fa354ea7c8c15ea7c44f0e246

Session: 64389985008C00012DA6478A7870BA06_DNE_8_v2

Date: Thu Apr 13 2023 09:46:04 GMT+0530 (India Standard Time)


Fatal Exception: java.lang.Error: FATAL EXCEPTION [DefaultDispatcher-worker-1]
Unity version : 2021.3.20f1
Device model : samsung SM-A605G
Device fingerprint: samsung/a6pltedx/a6plte:10/QP1A.190711.020/A605GDXU9CVB1:user/release-keys
Build Type : Release
Scripting Backend : IL2CPP
ABI : armeabi-v7a
Strip Engine Code : true



Caused by it.airgap.beaconsdk.core.exception.InternalException: No reachable Matrix node found.
at it.airgap.beaconsdk.core.internal.utils.ErrorKt.failWith(Error.kt:18)
at it.airgap.beaconsdk.core.internal.utils.ErrorKt.failWith$default(Error.kt:16)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.failWithUnreachableNodes(P2pMatrixStore.kt:164)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.relayServer-IoAF18A(P2pMatrixStore.kt:152)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore.access$relayServer-IoAF18A(P2pMatrixStore.kt:18)
at it.airgap.beaconsdk.transport.p2p.matrix.internal.store.P2pMatrixStore$relayServer$1.invokeSuspend(:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

FinalizerWatchdogDaemon:
at java.lang.Object.wait(Object.java)
at java.lang.Object.wait(Object.java:442)
at java.lang.Object.wait(Object.java:568)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded(Daemons.java:339)
at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:319)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:919)

UnityMain:
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at com.unity3d.player.UnityPlayer$e.run(:20)

ktor-okhttp-dispatcher-worker-2:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:353)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:794)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:739)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:710)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

main:
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)

pool-33-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

ReferenceQueueDaemon:
at java.lang.Object.wait(Object.java)
at java.lang.Object.wait(Object.java:442)
at java.lang.Object.wait(Object.java:568)
at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:215)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:919)

pool-31-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

ktor-okhttp-dispatcher-worker-3:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:353)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:794)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:739)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:710)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

UnityChoreographer:
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at android.os.HandlerThread.run(HandlerThread.java:67)

pool-34-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

pool-24-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1132)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

pool-23-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:849)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

ConnectivityThread:
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at android.os.HandlerThread.run(HandlerThread.java:67)

Okio Watchdog:
at java.lang.Object.wait(Object.java)
at java.lang.Object.wait(Object.java:442)
at java.lang.Object.wait(Object.java:568)
at com.android.okhttp.okio.AsyncTimeout.awaitTimeout(AsyncTimeout.java:313)
at com.android.okhttp.okio.AsyncTimeout.access$000(AsyncTimeout.java:42)
at com.android.okhttp.okio.AsyncTimeout$Watchdog.run(AsyncTimeout.java:288)

Timer-0:
at java.lang.Object.wait(Object.java)
at java.lang.Object.wait(Object.java:442)
at java.lang.Object.wait(Object.java:568)
at java.util.TimerThread.mainLoop(Timer.java:533)
at java.util.TimerThread.run(Timer.java:512)

queue-1-2:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

pool-25-thread-1:
at sun.misc.Unsafe.park(Unsafe.java)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQu...`

Unreadable QR Codes

Multiple developers reported that when displaying the QR Code through the method SetQrCode of the class QRCodeView, the displayed QRCode is too condensed and unusable.

Some reported that by changing the "Game view Scale", it helped, so the issue seems to be related to display dimensions, but others tried different ratios/dimensions and couldn't get it to work.

Offer Single Entry Point to API

The SDK includes a Tezos API. Great.

However, the API is relatively low level and includes no single entry point to the Tezos API.

This requires more setup for the user to create the lifecycle, maintain it, and dispose it.

I suggest the SDK be updated to provide that.

Feature Description

Video

Here is a Slack video of me talking about this ticket repeating the same info. https://tezos-dev.slack.com/archives/C04JEV96Q2H/p1678109676203329

Text

Moreover, by providing a single point of entry, more quality-of-life functionality can be built on top of that established single entry point. Tangentially-related tickets such as #12 and #13 will benefit from the ticket below.

What would this feature look like?

  • TezosSingleton.Instance - Created on demand
  • TezosSingleton.Instance - Persists during a unity play session and across multiple runtime scenes. It does not need to persist between play sessions (since there are no edit-time tools yet offered by the SDK).

What would this feature allow on top of it?

A definition of done, is that with no preceding code, the following snippet will create, maintain, and dispose of the lifecycle of the TezosSingleton on behalf of the developer.

Here is a demonstration of that with some additional API on top of it.

bool isAuthenticated = TezosSingleton.Instance.IsAuthenticated;
await TezosSingleton.Instance.AuthenticateAsync();
await TezosSingleton.Instance.DeauthenticateAsync();

Possible Solution Paths

Often for Unity-C#-facing API's this is done with a custom Singleton implementation. There are alternatives, but that one is pretty decent and recommended.

Feature Inspiration

Pseudocode

For conversations' sake, here is the approach to API shape I have used when solving something similar in non-Tezos SDKs.

The following is pseudocode for one of my own non-Tezos SDKs.

It is not meant as a specific solution to this ticket, but rather an inspiration that demonstrates evidence of a single entry point.

Notice below that all calls utilize the single entry point of CustomWeb3System. It is a singleton.

namespace RMC.Core.Samples
{
    public class Example01_SmartContractCallAsync : MonoBehaviour
    {
        
        //  Unity Methods  --------------------------------
        protected async void Start()
        {
            // Initialize the API
            await CustomWeb3System.Instance.InitializeAsync();
            
            // Check Authentication in API
            bool isAuthenticated = CustomWeb3System.Instance.IsAuthenticated;
            if (!isAuthenticated)
            {
                await CustomWeb3System.Instance.AuthenticateAsync();
            }

            // Now the API features are ready to be used, etc...
            var foo = await CustomWeb3System.Instance.GetBlahAsync();

        }
    }
}

TAG
#PriorityForSam

The type 'JObject' is defined in an assembly that is not referenced

I followed the instructions to use the sdk in unity (on opentezos), I import the Tezos SDK package and also the Newtonsoft package because I use a recent version of unity.
Then i have this error: Assets\tezos-unity-sdk-main\Runtime\Scripts\BeaconSDK\BeaconConnectorDotNet.cs(150,56): error CS0012: The type 'JObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Newtonsoft.Json.

Temporary workaround: https://github.com/jilleJr/Newtonsoft.Json-for-Unity/wiki/Install-official-via-UPM

Add Authentication.prefab to SDK

Authentication is a popular use case of Web3. So popular I suggest it be solved at the SDK level.

Current

The repo contains a "Demo Example. unity" scene that shows authentication. That's great.

See image.

  1. The included scene
  2. shows the QR code
  3. Which is part of a functional, demo-only prefab

image

There are many ways to solve it well. May the following be inspiration for those assigned. I recommend to address the optional prerequisites first to provide a foundation for the suggestion below.

Prerequisites

Suggestion

  • Create an Authentication.prefab and include it in the SDK. It includes a Unity Canvas and the components scripts within for a generalized authentication solution meant for production.

Scoping

  • Meeting all use-cases is unrealistic. Some users will have custom needs. Due diligence in planning can include a modest set of common production needs. For example, do include a light C# api to call things like Connect(), Disconnect() and OnAuthenticationStateChanged.AddEventListener(), yet do not offer custom customization of any visual elements like the color of the QR image.

Definition of Done

Something like this.

  1. User creates a new Unity Project
  2. User imports SDK through Unity Package Manager
  3. User creates a new scene
  4. User drags the Authentication.prefab from /Packages/Blah/Foo/ to the Unity Scene Hierarchy. This does not render in the Scene View (e.g. visual elements are not enabled)
  5. User selects the Authentication.prefab instance in the scene and modifies the custom properties. (e.g. Set "WillConnectOnAwake=true")
  6. User plays the scene
  7. Authentication.prefab instance connects upon Awake
  8. Authentication.prefab instance is now visible
  9. User sees the QR code shown centered onscreen
  10. User captures QR code with compatible wallet (this functionality already exists). The user is now authenticated
  11. Authentication.prefab instance is now not visible

TAG
#PriorityForSam

`VerifySignedPayload` fails with `Invalid Hex string` message

We are trying to sign a payload and our backend validates it. On the webgl this works fine but on the android our backend validation fails to validate. Since validation works for webgl we thought maybe this is related to tezos sdk.

Below is an payload example

Sign this for authorization s2asd45asf75as6d76

We have tried all 3 signing types. All gives same signature.

Also when we tried tezos sdk's VerifySignedPayload method, we get an error about Invalid Hex string. We are not sure about the behaviour change between webgl and android. We have tried converting payload to hex aswell but that only helped about VerifySignedPayload method and not backend validation.

The type or namespace name 'Newtonsoft' could not be found

Reproducing:
This was after creating a new project from scratch in Unity, then dragging the TezosUnitySDK folder into the assets. Basically following this:
https://opentezos.com/gaming/unity-sdk/getting-started/

Environment:
With Unity Editor Version 2021.3.18f1 - Silicon - LTS

Workarounds:

  • This could be fixed by adding ‘"com.unity.nuget.newtonsoft-json": "3.0.2"’ in Packages > manifest.json but other errors appears, so it seems like there is a more general issue with dependencies.
  • In Packages\manifest.json, if I replace the first line: "com.unity.collab-proxy": "2.0.0" with "com.unity.collab-proxy": "1.17.2", Then the error is gone, and the project builds correctly

Repo - Structure as Unity UPM-compatible Package

The repo is currently structured as a Unity Project. (link)

To improve integration with user's new and existing Unity Projects, I suggest...

Suggestion

  1. The repo be structured instead as a Unity UPM-compatible Package (link)

Optional Additions

  • I moved this to its own ticket - The resulting package be published to NPMJS - #23

NOTE: This request does not directly relate to any current or future release of the Tezos Unity SDK on the ASSET STORE. That is a separate subject matter.

TAG
#PriorityForSam

Events not firing

SDK 1.4.0
Unity 2021.3.23f1

Game of 3 scences
Home scene i have a script behind with the following

NOTE: I was using your singleton patteren (Which was not working, same error) but moved code.

private ITezos _tezos;

void Start()
{
        _tezos = TezosSingleton.Instance;
        _tezos.Wallet.MessageReceiver.AccountConnected += OnAccountConnected;
        _tezos.Wallet.MessageReceiver.AccountDisconnected += OnAccountDisconnected;
}

public void ConnectWallet()
    {
        _tezos.Wallet.Connect();
    }

    private void OnAccountConnected(string account)
    {
        
        if (!string.IsNullOrEmpty(account))
        {
            welcomeText.text = _tezos.Wallet.GetActiveAddress();
        }
    }

When this screen first loads, i am able to connect and disconnect as the MessageReciever events are firing.

When i return to Home scene,
_tezos.Wallet.GetActiveAddress() is set correctly
but none of the MessageReciever events are getting fired

In Chrome DevTools i am seeing this error when i try to "Connect" again. (Temple, opens and i log in etc and confirm but then nothing.)

SendMessage: object UnityBeacon not found!

Error: Sharing violation on beacon.db

OS: Windows 10
Unity version: 2021.3.23f1
Unity SDK version: 1.3.0
Target platform: Windows Standalone

Steps to reproduce:

  • Create new project
  • Import Unity SDK via UPM
  • Drag AuthenticationQr.prefab into an empty scene
  • Press play

Sometimes it works, sometimes it fails.

Error:
IOException: Sharing violation on path C:\Users\xxx\AppData\LocalLow\Tezos\Examples Project\beacon.db
image

Workaround:
If close and open the Unity editor it works well once afterwards

Hint:
Most likely the c# code leaves a file open somethimes, but it should never do so.

Demo QR Authentication Process is Unstable

Authentication is a popular use case of Web3.

The repo contains a "Demo Example. unity" scene that shows authentication. That's great.

Sometimes it works.

Sometimes it doesn't. Here is info on failing scenarios with both Temple Wallet and Umami Wallet.

Trial Scenario 1 - With Temple Wallet

Test Scenario

  • SDK Version: fc3eaf5
  • Unity Version: 2021 Latest LTS
  • Unity Editor Platform: Windows
  • Unity Target Platform: WindowStandalone
  • Mobile Wallet: Temple Wallet on Android

Expected User Experience

  1. Open "Example Demo.unity" Scene
  2. Play Scene
  3. Scan QR With Mobile
  4. Mobile Wallet: Scan Unity QR
  5. Mobile: Success
  6. Unity UI shows ‘Welcome”. This is the key sign of success.
  7. Stop Scene

Actual User Experience

Sometimes it succeeds per EXPECTED RESULTS above. Sometimes it fails per either of the 2 ways below.

Failure Type # 1

  1. Open "Example Demo.unity" Scene
  2. Play Scene
  3. Scan QR With Mobile
  4. Mobile Wallet: Scan Unity QR
  5. Mobile: Success
  6. Mobile: Failure. Hangs forever (e.g. 15 seconds, then I choose to close the app)
  7. Stop Scene

Failure Type # 2

  1. Open "Example Demo.unity" Scene
  2. Play Scene
  3. Scan QR With Mobile
  4. Mobile Wallet: Scan Unity QR
  5. Mobile: Success
  6. Mobile: Failure. Shows Invalid code
  7. Stop Scene

Workarounds: All testing is done without any workarounds. No workarounds have been discovered for temple wallet.

Trial Scenario 2 - With Umami Wallet

Test Scenario

  • SDK Version: fc3eaf5
  • Unity Version: 2021 Latest LTS
  • Unity Editor Platform: Windows
  • Unity Target Platform: WindowStandalone
  • Mobile Wallet: Umami Wallet on Android

Expected User Experience

  1. Open Scene
  2. Play Scene
  3. Scan QR With Mobile
  4. Mobile Wallet: Scan Unity QR
  5. Mobile: vibrates when detecting the QR
  6. Mobile: Shows “Confirm?” User click yes
  7. Mobile: Success
  8. Unity UI shows ‘Welcome”. This is the sign of success.
  9. Stop Scene

Actual User Experience

Sometimes it succeeds per EXPECTED RESULTS above. Sometimes it fails per below.

Failure Type # 3

  1. Open Scene
  2. Play Scene
  3. Scan QR With Mobile
  4. Mobile Wallet: Scan Unity QR
  5. Mobile: vibrates when detecting the QR. Good.
  6. Mobile: shows the 0 dapps or 1 dapps image without showing any “Confirm?”
  7. Unity UI continues to show the QR code
  8. Stop Scene

Images

NOTE: Neither image necessarily indicates a failure. But if we start with 0 dapps, and you register and it fails, the result will still show 0 dapps. And if we start with 1 dapps, and you register and it fails, the result will still show 1 dapps.

With No Dapps

With One Dapps

Workarounds: All testing is done without any workarounds. However, a short-term workaround with Umami I found is to remove all registered 'dapps' within the mobile wallet before each attempt at authentication.

TAG
#PriorityForSam

Allow users to specify logging level

  1. Reduce logging level to INFO by default.
  2. Provide a convenient interface to turn on/off verbose logging (Debug.Log() calls) or instructions in the docs on how to enable debug mode.
  3. Uncomment Debug logs

Demo scene: authentication prefab + NFT data access

Add new scene to the samples that will showcase the usage of the Authentication prefab and NFT API.

It should include:

  • Working authentication through the prefab
  • Examples of API usage for the following use cases:
    • "Do I have NFT X"? (Thus, the currently authenticated user) IsHolderOfToken (+ GetActiveWalletAddress)
    • "Does user with address of "tzABCD...1234" have NFT X"? (Thus, NOT the currently authenticated user) IsHolderOfToken
    • "List all NFTS for user with address of "tzABCD...1234" "? (Thus, NOT the currently authenticated user) GetTokensForOwner

NFT examples not necessarily should be accompanied with UI, a simple debug log would be enough

Fix: Redundant line of code in TrackTransaction method

Issue Definition

This line of code is redundant because the while loop condition already checks the success variable, and the loop will not continue if success is true.

Code Snippet

public IEnumerator TrackTransaction(string transactionHash)
{
    var success = false;
    const float timeout = 30f; // seconds
    var timestamp = Time.time;

    // keep making requests until time out or success
    while (!success && Time.time - timestamp < timeout)
    {
        if (success) break;                                                <---
        Logger.LogDebug($"Checking tx status: {transactionHash}");
        yield return TezosSingleton.Instance.GetOperationStatus(result =>
        {
            if (result != null)
                success = JsonSerializer.Deserialize<bool>(result);
        }, transactionHash);

        yield return new WaitForSecondsRealtime(3);
    }

    ContractCallInjectionResult result;
    result.success = success;
    result.transactionHash = transactionHash;
    ContractCallCompleted?.Invoke(JsonUtility.ToJson(result));
}

Additional Context

This fix will not affect the functionality of the method.

The type or namespace name 'iOS' could not be found

This seems to happen when you don't select iOS as one of your target when installing Unity.

Workarounds:

  • with an "ifdef".
  • by installing the ‘iOS Build Support’: in ‘Installs’ > Parameter button next to the editor already installed > iOS Build Support

It seems like something needs to be changed to avoid this error when people didn't select iOS as one of the dependencies.

Plugin/dll issue swhen Building for WebGL

This was reported during the solution verification process:

The following error is thrown when attempting to build for WebGL:
Plugin 'System.Threading.Tasks.Extensions.dll' is used from several locations:
Assets/Plugins/BeaconDotNet/System.Threading.Tasks.Extensions.dll would be copied to /System.Threading.Tasks.Extensions.dll
Assets/Plugins/Netezos/System.Threading.Tasks.Extensions.dll would be copied to /System.Threading.Tasks.Extensions.dll
Plugin 'System.Buffers.dll' is used from several locations:
Assets/Plugins/Netezos/System.Buffers.dll would be copied to /System.Buffers.dll
Assets/Plugins/BeaconDotNet/System.Buffers.dll would be copied to /System.Buffers.dll
Plugin 'System.Numerics.Vectors.dll' is used from several locations:
Assets/Plugins/Netezos/System.Numerics.Vectors.dll would be copied to /System.Numerics.Vectors.dll
Assets/Plugins/BeaconDotNet/System.Numerics.Vectors.dll would be copied to /System.Numerics.Vectors.dll
Plugin 'System.Memory.dll' is used from several locations:
Assets/Plugins/BeaconDotNet/System.Memory.dll would be copied to /System.Memory.dll
Assets/Plugins/Netezos/System.Memory.dll would be copied to /System.Memory.dll
Please fix plugin settings and try again.

A meta data file (.meta) exists but its asset 'Packages/com.trilitech.tezos-unity-sdk/CHANGELOG.md' can't be found

Steps to reproduce:

  1. Import SDK via Package Manager

Full error text:

A meta data file (.meta) exists but its asset 'Packages/com.trilitech.tezos-unity-sdk/CHANGELOG.md' can't be found. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it.

Couldn't delete Packages/com.trilitech.tezos-unity-sdk/CHANGELOG.md.meta because it's in an immutable folder.

Unable to find a constructor to use for type MatrixServerVersionsResponse

When using the SDK on iOS, I get a JSON serialization error.

JsonSerializationException: Unable to find a constructor to use for type Matrix.Sdk.Core.Infrastructure.Dto.ClientVersion.MatrixServerVersionsResponse. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'versions', line 1, position 12.

I think this is the reason because iOS authentication is buggy.

I think that we need to put a default constructor here:
Matrix.Sdk/Core/Infrastructure/Dto/ClientVersion/MatrixServerVersionsResponse.cs

Edit:
Actually, changing Managed Stripping Level from Low to Minimal fix it!
image

Maybe we should add a link.xml in the sample folder to force it or write in the README that only works on iOS with Managed Stripping Level selected to Minimal.

Add a higher-level API for reading data from FA2 contracts

The SDK currently provides a low level API on top of which a lot can be built, with some effort.

To make things easier for most devs, key use cases should be supported directly by the SDK using a higher-level API.

One such important use case, is accessing the list of tokens of a given user address in a given FA2 contract, along with their metadata. This would be an API that handles aspects of tzip-12 (FA2), tzip-16 (Contract metadata) and tzip-21 (Rich Metadata).

A very first version of the API would support just enough to interact with the contracts created by the Objkt's minting Factory. Here is an example of such contract: KT1AXCXcYiV1ACc6diBfHq1TVynj8KvqeoUZ

The API would make it possible to:

  • obtain the list of tokens that a given user owns on such a contract
  • obtain metadata such as the values the image, tags and attributes from each of these tokens.

Fetching these can be done through tzkt, with a query like this:
https://api.tzkt.io/v1/tokens/balances?token.contract=KT1AXCXcYiV1ACc6diBfHq1TVynj8KvqeoUZ&account=tz1ZuhCMnA1gZHfNzgKNFm1B2mjSDKJsQfJN

Performance issues need to be taken into account, to avoid putting unnecessary load on tzkt. In the initial use case, the intent is not for the game to get real time updates on these, but maybe load them at startup or when the user explicitly requests to refresh the data. For real time updates, a system of events would later need to be added.

Support for pagination and filtering / requesting only a subset of the fields could be a good idea to improve performance, but a version without it would already be great.

Invalid private key length with Key.FromBase58

I was working on a live-minting tool with Netezos & Unity. And since now the UnitySDK released, I'm porting my codes from Netezos to UnitySDK version of Netezos (the main different is the IEnumerator wrapper)

And I found an issue when I try to send transactions with private key, there's a "Invalid Private Key" warning in the UnitySDK version, and made my code fail. (I made a check that my length is 64 so the check failed)

It is in the Key.cs line 39 & 40
https://github.com/trilitech/tezos-unity-sdk/blob/main/Assets/Scripts/Netezos/Keys/Key.cs

I simply remove the length check, and it worked. The transaction also successfully sent to the blockchain. So I guess the check is unnecessary?

And here is my code:
`

    // This part will fail if the length check exists
    Key testKey = Key.FromBase58("my private key from Temple wallet");
    var address = testKey.Address;
    
    // RPC part
    TezosRpc rpc = new TezosRpc("https://mainnet.api.tez.ie");

    //var headBlockData = await rpc.Blocks.Head.Header.GetAsync();
    CoroutineWrapper<string> headCoroutine = new CoroutineWrapper<string>(rpc.Blocks.Head.Hash.GetAsync<string>());
    yield return headCoroutine;
    string headHash = headCoroutine.Result;

    CoroutineWrapper<int> counterCoroutine = new CoroutineWrapper<int>(rpc.Blocks.Head.Context.Contracts[address].Counter.GetAsync<int>());
    yield return counterCoroutine;
    int addressCounter = counterCoroutine.Result + 1;

    // call fxhash contract 'mint' entrypoint
    var operation = new TransactionContent
    {
        Source = testKey.Address,
        Destination = "KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv",
        Counter = addressCounter,
        Amount = 0,
        GasLimit = 46000,
        Fee = 6000,
        StorageLimit = 1000,
        Parameters = new Parameters
        {
            Entrypoint = "mint",
            Value = new MichelinePrim
            {
                Prim = PrimType.Pair,
                Args = new List<IMicheline>
                {
                    new MichelineInt(14176),
                    new MichelinePrim
                    {
                        Prim = PrimType.Pair,
                        Args = new List<IMicheline>
                        {
                            new MichelinePrim{ Prim = PrimType.None },
                            new MichelinePrim{ Prim = PrimType.None }
                        }
                    }
                }
            }
        }
    };

    CoroutineWrapper<byte[]> forgeCoroutine = new CoroutineWrapper<byte[]>(new LocalForge().ForgeOperationAsync(headHash, operation));
    yield return forgeCoroutine;
    var operationBytes = forgeCoroutine.Result;

    byte[] signature = testKey.SignOperation(operationBytes);

    CoroutineWrapper<dynamic> transactionCoroutine = new CoroutineWrapper<dynamic>(rpc.Inject.Operation.PostAsync(Combine(operationBytes, signature)));
    yield return transactionCoroutine;
    
    dynamic opResult = transactionCoroutine.Result;

`

Netezos related warnings

Assets\TezosUnitySDK\Scripts\Helpers\NetezosExtensions.cs(21,37): warning CS0436: The type 'ContractScript' in 'C:\Users\mathi\My project (2)\Assets/TezosUnitySDK/Scripts/Netezos/Contracts/ContractScript.cs' conflicts with the imported type 'ContractScript' in 'Netezos, Version=2.6.2.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'C:\Users\mathi\My project (2)\Assets/TezosUnitySDK/Scripts/Netezos/Contracts/ContractScript.cs'.

Better coroutine error handling

When we send a request with a coroutine, we cannot see whether
that coroutine is a failed or not. There are no individual events that give their result for
each call (for each coroutine). It is essential to provide comprehensive error
handling to help developers diagnose issues and ensure a smooth user experience.

Add Cross-Session-Persistence to Authentication

Authentication is a popular use case of Web3.

Current

The repo contains a "Demo Example. unity" scene that shows authentication. That's great.

See image.

  1. The included scene
  2. shows the QR code
  3. Which is part of a functional, demo-only prefab

image

Current UX

  1. Open "Example Demo.unity" Scene
  2. Play Scene
  3. UI shows QR code indicating the user is not authenticated
  4. User authenticates (e.g. With QR code and mobile wallet)
  5. Runtime UI shows "Welcome" indicating user is authenticated
  6. Stop Scene
  7. Play Scene
  8. UI shows QR code indicating the user is not authenticated This is the issue

I assume there is zero cross-session-persistence to the authentication. This limits the end-player experience using apps built on top of the SDK. This also limits the quality of life for developers working on top of the SDK. The current requirement to auth every time a developer hits play is a time-sink.

Suggestion

  • Allow the authenticated user to stay authenticated between game sessions (e.g. stop/start scene) , unity sessions (e.g. close/open unity editor), etc...

Suggested UX

  1. Open "Example Demo.unity" Scene
  2. Play Scene
  3. UI shows QR code indicating the user is not authenticated
  4. User authenticates (e.g. With QR code and mobile wallet)
  5. Runtime UI shows "Welcome" indicating user is authenticated
  6. Stop Scene
  7. Play Scene
  8. Runtime UI shows "Welcome" indicating user is authenticated. This is a definition of done.

Ideally the session persists as long as is feasible per any security concerns (e.g. days/weeks)

Ideally, the SDK supports an API to disconnect/end the authenticated session (e.g. User clicks a logout button). This is a must-have feature.

Workaround

Before this task is fully complete, a hacky workaround that would help user-devs would be to add functionality to the API to hardcode an authenticated web3 address and thus bypass the need to auth.

Pseudocode

if (isWorkaround)
{
     //Fake auth. Or perhaps there is a legit long-term use case of this API
     FakeTezosSDK.blah.FakeAuthWithAddress ("0x123...ABC");
}
else
{
    // Do full auth with QR code
}

// Full API is ready for use

TAG
#PriorityForSam

Error when a wallet is disconnected/severs connection. Halts execution

Hello,

I wanted to use the OnDisconnect event to detect wallet changes/disconnects so the user could be prompted. However due to the below error, I can't do that. Unless I'm doing something stupidly wrong (in which case, please let me know how I can correctly do this), please confirm the issue.

I'm using SDK version 1.2.0, but this is reproduced in 1.2.1 as well.

The error comes from walletbeacon.min.js apparently. The game loop doesn't have a chance to be triggered since it never reaches there, it happens on the web app itself.

Steps to reproduce:

  • Use Airgap as web template and build the demo app/sample app on WebGL.
  • Click login and connect any wallet.
  • Once logged in, simply sever connection from the wallet.
  • On checking the console, you'll see the error. Reproduced on Firefox and other chromium based browsers.

The below error log is from firefox, but similar logs would be available from other browsers.

Uncaught Error: Permission denied to access property "apply"
    onerror moz-extension://253c8873-2f90-4700-92e8-08c01dca50f1/content_script/inpage_sol.js:143
inpage_sol.js:143:16115
    onerror moz-extension://253c8873-2f90-4700-92e8-08c01dca50f1/content_script/inpage_sol.js:143

-----------------------------------------------------------------------------------------------------------------------------

Uncaught Error: Permission denied to access property "apply"
    onunhandledrejection moz-extension://253c8873-2f90-4700-92e8-08c01dca50f1/content_script/inpage_sol.js:143
inpage_sol.js:143:16268
    onunhandledrejection moz-extension://253c8873-2f90-4700-92e8-08c01dca50f1/content_script/inpage_sol.js:143

-----------------------------------------------------------------------------------------------------------------------------

Uncaught (in promise) TypeError: typedMessage.message is undefined
    DAppClient http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    handleResponse http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    Client http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    Client http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    Transport http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    Transport http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    notifyListeners http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    P2PTransport http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    callbackFunction http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    callbackFunction http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emit http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emit http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emitClientEvent http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emitMessage http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emitMessage http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    emitIfEvent http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    onStateChanged http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    MatrixClient http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    notifyListeners http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    notifyListeners http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    MatrixClientStore http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    update http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    initialPollingResult http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    initialPollingResult http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    pollSync http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    pollSync http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    pollSync http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    pollSync http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    setTimeout handler*[274]</MatrixClient.prototype.poll/MatrixClient</</pollSync/</< http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    verb http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    fulfilled http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    promise callback*step http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
    __awaiter http://127.0.0.1/StreamingAssets/walletbeacon.min.js:1
walletbeacon.min.js:1:1369870

Add 'Custom ReadMe' to Unity Inspector Window for FTUE

Background Info

Projects

  • Tezos SDK For Unity - Examples - A set of scene by scene examples showcasing SDK Features in isolation
  • Tezos SDK For Unity - Sample {tbd} Game - A complete game showcasing SDK Features together

Both projects will include a custom implementation of ReadMe within Unity.

ToDo

I suggest that the Tezos SDK itself also have this functionality. It provides good FTUE orientation and provides consistency with the projects above.

If the team agrees, please complete this ticket. Here are steps to complete and further below are some helpful demo resources.

  1. Copy Demo code from the Demo Project to the /Assets/ folder of the SDK Repo
    1 Validate the ReadMe works as shown in the video
  2. Move Demo code to the /Package/ of the repo (subfolder of your choice)
  3. Validate the ReadMe works (still) as shown in the video
  4. Update the ReadMe layout (video explains how) to meet your final specs

Dependencies

While not strictly required, I recommend to complete the following before starting this ticket.

Demo

Demo Resources

Demo Screenshot

image

[WebGL] MichelinePrim serialization is not working properly on WebGL

Definition

MichelinePrim might be causing issues with WebGL due to its use of certain .NET features that might not be fully supported in Unity's WebGL runtime, such as the complex binary serialization logic.

Screenshots

  1. While trying to find the cause of #88, I noticed that WebGL build was not sending the view_items_on_market request.

image

  1. To debug this, I added some Debug Logs in PostJson method.

PostJson

  1. When using MichelinPrim as an input, an exception being thrown at this line, blocks the request from being sent.

FetchMarketItemsWithMichelinePrim

  1. When using "{\"prim\": \"Unit\"}" as an input instead of MichelinePrim, it gets serialized successfully and the request being sent.

FetchMarketItemsWithoutMichelinePrim

'Newtonsoft' could not be found in macOS

This error message appears and could not play:

Assets/TezosUnitySDK/Scripts/BeaconSDK/BeaconConnectorDotNet.cs(17,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)

Tested with a clean project with just TezosSDK 1.0 intalled.
Also try replacing Scripts with the current repo, but still not working.

Unity Version: 2021.3.20f1
macOS Version: 13.2.1

Screenshot 2023-03-09 at 3 10 47 PM

Screenshot 2023-03-09 at 3 10 38 PM

WebGLFrontend lack .meta files

Bug Definition

Unity gives these errors when the SDK is imported from the Package Manager with Git URL.

image

These assets lack corresponding .meta files, causing Unity to ignore them. As a result, they are not being imported into the project.

Steps To Reproduce

  1. Create a new project
  2. Import the SDK from Package Manager with Git URL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.