Web3ModalUnity icon indicating copy to clipboard operation
Web3ModalUnity copied to clipboard

Compilation errors in Web3ModalUnity

Open mtakagi opened this issue 2 years ago • 3 comments

Hello, I added a dependency on Web3ModalUnity to a project using UniRx and now I get the following compile error. What should I do?

error CS0121: The call is ambiguous between the following methods or properties: 'System.ObservableExtensions.Subscribe<T>(System.IObservable<T T>, System.Action<T>)' and 'UniRx.ObservableExtensions.Subscribe<T>(System.IObservable<T>, System.Action<T>)'

mtakagi avatar May 27 '24 05:05 mtakagi

Hello @mtakagi,

Sorry for the delayed response. What version of Unity do you have? Did you install both packages through OpenUPM?

I created a new project using Unity 2022.3.18f1, installed both packages from OpenUPM, and no error message appeared.

skibitsky avatar May 31 '24 09:05 skibitsky

@skibitsky Thanks for the reply. The version of Unity used is unity 2023.3.12f1. I installed Web3Modal with OpenUPM and UniRx using git url. The code that generated the error was the following code.

        button.OnClickAsObservable().Subscribe(_ => {
            Debug.Log("OnCLick!");
        }).AddTo(gameObject);

Web3ModalTest-main.zip

mtakagi avatar Jun 05 '24 08:06 mtakagi

Hey @mtakagi,

Thank you very much for sharing the project! The issue will be fixed in the next release, which is going live next week.

skibitsky avatar Jun 06 '24 09:06 skibitsky