WalletConnect / Web3ModalUnity

WalletConnect AppKit: a single Web3 provider solution for all Wallets
Apache License 2.0
7 stars 2 forks source link

Error on Unity 2022.3.37f1 - EncodeTexture Parameter Issue #13

Closed brian-kryptomon closed 1 month ago

brian-kryptomon commented 1 month ago

Link to minimal reproducible example

Simply install on unity version above and project won't start

Summary

The build will not compile on this unity version because it says the encodetexture method requires int not colors.

I have downgraded back to 0.3.2 and it works fine so seems like an issue on the latest version only.

List of related npm package versions

OpenUPM standard config per install instructions:

    "com.nethereum.unity",
    "com.walletconnect.core",
    "com.walletconnect.nethereum",
    "com.walletconnect.ui",
    "com.walletconnect.web3modal"

package: "com.walletconnect.web3modal": "0.4.0"

skibitsky commented 1 month ago

Hey @brian-kryptomon,

Does that happen in one of our sample Unity projects or in your own project?

thirdheronet commented 1 month ago

yop i can confirm, 0.4.0 is broken, there is fatal error in the code, you need replace 2 parameters for int (probably size of QR texture), i putted there 256, 256 (or something like that) and its works, but its just emergency solution, i did not want downgrade, i even created new Unity project to verify that..

Library\PackageCache\com.walletconnect.web3modal\Runtime\Components\QrCode.cs(58,70): error CS1503: Argument 2: cannot convert from 'UnityEngine.Color' to 'int'

Screenshot 2024-07-16 160353

skibitsky commented 1 month ago

Thanks, I'll fix it asap

brian-kryptomon commented 1 month ago

Thanks all - btw the implementation on this is very solid. The only thing I've found a little bit challenging is that the on connect is an event and it would nice to have something as an async await style call but I understand why it was done. I got around it by using the TaskCompletionSource pattern so I'm not blocked.

-Brian

On Tue, Jul 16, 2024 at 10:36 AM Gleb Skibitsky @.***> wrote:

Thanks, I'll fix it asap

— Reply to this email directly, view it on GitHub https://github.com/WalletConnect/Web3ModalUnity/issues/13#issuecomment-2231083442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXQIF3A6XSXGPNBAJO2JH23ZMUVVBAVCNFSM6AAAAABK6SHAI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRGA4DGNBUGI . You are receiving this because you were mentioned.Message ID: @.***>

skibitsky commented 1 month ago

it would nice to have something as an async await style call

I can look into adding an async method. What do you expect to happen when you call it? Should a modal open?

brian-kryptomon commented 1 month ago

Yeah ideally it would open the modal and return the account or some sort of connected success indicator. -BrianOn Jul 16, 2024, at 12:09 PM, Gleb Skibitsky @.***> wrote:

it would nice to have something as an async await style call

I can look into adding an async method. What do you expect to happen when you call it? Should a modal open?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

skibitsky commented 1 month ago

@brian-kryptomon @thirdheronet could you please try v0.4.1?

thirdheronet commented 1 month ago

@skibitsky for me it's works, the error is done and QR image works too..