MetaMask / MetaMask/metamask-sdk

[Bug]: Unity: MetaMaskUnityUIHandler lost between scenes

Open
#963 0 comments 0 reactions 1 assignee Claimed by @ecp4224 View on GitHub
Bug Triage Unity
Dominant language
TypeScript
Stars
338
Forks
260
PR merge metrics
No merged PRs in 30d

Description

### SDK

Unity

### Provide environment information

Unity 2022.3.25f1

### MetaMask SDK Version

2.1.0

### MetaMask Mobile app Version

7.27.0

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

The MetaMaskUnityUIHandler isn't shared between scenes. If I initialize the MetaMask SDK in the Boot Scene and then try to call the Connect function in another scene, there is no UI response, but MetaMask still attempts to connect somehow.

### Expected Behavior

MetaMaskUnityUIHandler should persist between scenes OR spawn every time it's needed.

### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

_No response_

### To Reproduce

1. Create 2 scenes (e.g Boot and Main)
2. Initialize MM at Boot (manually or automatically)
3. Go to Main Scene
4. Call Connect() function

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.