1"use strict";(self.webpackChunkwalletconnect_docs=self.webpackChunkwalletconnect_docs||[]).push([[983],{97038:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var r=t(13274),l=t(79449),a=t(78377),s=t(50391);const i={},o="Options",c={id:"appkit/unity/core/options",title:"Options",description:"Explorer included wallets",source:"@site/docs/appkit/unity/core/options.mdx",sourceDirName:"appkit/unity/core",slug:"/appkit/unity/core/options",permalink:"/appkit/unity/core/options",draft:!1,unlisted:!1,editUrl:"https://github.com/WalletConnect/walletconnect-docs/blob/main/docs/appkit/unity/core/options.mdx",tags:[],version:"current",lastUpdatedAt:1740270108e3,frontMatter:{},sidebar:"AppKit_Unity",previous:{title:"Usage",permalink:"/appkit/unity/core/usage"},next:{title:"Actions",permalink:"/appkit/unity/core/actions"}},d={},u=[{value:"Explorer included wallets",id:"explorer-included-wallets",level:3},{value:"Explorer excluded wallets",id:"explorer-excluded-wallets",level:3},{value:"Enable Installed Wallet Detection",id:"enable-installed-wallet-detection",level:3},{value:"Fullscreen in WebGL",id:"fullscreen-in-webgl",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"options",children:"Options"}),"\n",(0,r.jsx)(n.h3,{id:"explorer-included-wallets",children:"Explorer included wallets"}),"\n",(0,r.jsxs)(n.p,{children:["Allows to set included wallets that are fetched from ",(0,r.jsx)(n.a,{href:"https://walletconnect.com/explorer?type=wallet",children:"WalletConnect Explorer"}),". You can define a list of wallets ids you'd like to prioritize (order is respected). You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-csharp",children:'await Web3Modal.InitializeAsync(new Web3ModalConfig\n{\n includedWalletIds = new []\n {\n "c57ca95...74e97267d96",\n }\n});\n'})}),"\n",(0,r.jsx)(n.h3,{id:"explorer-excluded-wallets",children:"Explorer excluded wallets"}),"\n",(0,r.jsxs)(n.p,{children:["Allows to set excluded wallets that are fetched from ",(0,r.jsx)(n.a,{href:"https://walletconnect.com/explorer?type=wallet",children:"WalletConnect Explorer"}),". You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-csharp",children:'await Web3Modal.InitializeAsync(new Web3ModalConfig\n{\n excludedWalletIds = new []\n {\n "c57ca95...74e97267d96",\n }\n});\n'})}),"\n",(0,r.jsx)(n.h3,{id:"enable-installed-wallet-detection",children:"Enable Installed Wallet Detection"}),"\n",(0,r.jsx)(n.p,{children:"To enable Web3Modal to detect wallets installed on mobile devices, you need to make specific changes to the native side of the project."}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsxs)(s.A,{value:"unity-installed-wallets-android",label:"Android",children:[(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["In Unity ",(0,r.jsx)(n.a,{href:"https://docs.unity3d.com/Manual/overriding-android-manifest.html",children:"override Android Manifest"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Add your ",(0,r.jsx)(n.code,{children:"<queries>...</queries>"})," schemes outside of ",(0,r.jsx)(n.code,{children:"<application />"})," scope in the manifest file."]}),"\n",(0,r.jsxs)(n.li,{children:["Refer to ",(0,r.jsx)(n.a,{href:"https://developer.android.com/guide/topics/manifest/queries-element",children:"Android Specs"})," for more information."]}),"\n"]}),(0,r.jsx)(n.p,{children:"Example:"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'<?xml version="1.0" encoding="utf-8"?>\n<manifest xmlns:android="http://schemas.android.com/apk/res/android">\n\n <queries>\n <package android:name="io.metamask"/>\n <package android:name="com.wallet.crypto.trustapp"/>\n <package android:name="io.gnosis.safe"/>\n <package android:name="me.rainbow"/>\n \x3c!-- Add other wallet schemes names here --\x3e\n </queries>\n\n <application>\n ...\n </application>\n</manifest>\n'})}),(0,r.jsxs)(n.p,{children:["More wallet package names can be found in ",(0,r.jsx)(n.a,{href:"https://github.com/WalletConnect/WalletConnectUnity/blob/project/modal-sample/Assets/Plugins/Android/AndroidManifest.xml",children:"our sample AndroidManifest.xml"}),"."]})]}),(0,r.jsxs)(s.A,{value:"unity-installed-wallets-ios",label:"iOS",children:[(0,r.jsx)(n.p,{children:"Wallet detection may produce inaccurate results on iOS Simulator. It is recommended to test on a real device."}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Make an iOS build."}),"\n",(0,r.jsxs)(n.li,{children:["In the generated Xcode project, find ",(0,r.jsx)(n.code,{children:"Info.plist"})," file and open it with a external editor (i.e. not Xcode)."]}),"\n",(0,r.jsxs)(n.li,{children:["Locate or create ",(0,r.jsx)(n.code,{children:"<key>LSApplicationQueriesSchemes</key>"})," section."]}),"\n",(0,r.jsxs)(n.li,{children:["Add the desired wallet schemes as string entries within the ",(0,r.jsx)(n.code,{children:"<array>"}),". These schemes represent the wallets you want to detect."]}),"\n"]}),(0,r.jsx)(n.p,{children:"Example:"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n <dict>\n ...\n\n <key>LSApplicationQueriesSchemes</key>\n <array>\n <string>metamask</string>\n <string>trust</string>\n <string>safe</string>\n <string>rainbow</string>\n <string>uniswap</string>\n <string>zerion</string>\n <string>imtokenv2</string>\n <string>spot</string>\n <string>omni</string>\n <string>dfw</string>\n <string>tpoutside</string>\n <string>
1robinhood-wallet</string>\n </array>\n\n ...\n </dict>\n</plist>\n'})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"fullscreen-in-webgl",children:"Fullscreen in WebGL"}),"\n",(0,r.jsxs)(n.p,{children:["The default ",(0,r.jsx)(n.code,{children:"unityInstance.SetFullscreen(1)"})," method enables fullscreen for the canvas node by pushing\nit to the ",(0,r.jsx)(n.a,{href:"https://developer.mozilla.org/en-US/docs/Glossary/Top_layer",children:"top layer"}),".\nThis causes the modal to be rendered behind the canvas, making it invisible to the user when fullscreen is enabled."]}),"\n",(0,r.jsx)(n.p,{children:"To fix this, AppKit creates a container around the canvas node and appends the modal UI to it.\nBy requesting fullscreen on the container, the modal will always be rendered on top of the canvas."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-javascript",children:"// Use this instead of unityInstance.SetFullscreen(1) to enable full screen\ndocument.querySelector('#canvas-container').requestFullscreen();\n"})})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},50391:(e,n,t)=>{t.d(n,{A:()=>s});t(79474);var r=t(28923);const l={tabItem:"tabItem_PSrk"};var a=t(13274);function s(e){let{children:n,hidden:t,className:s}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(l.tabItem,s),hidden:t,children:n})}},78377:(e,n,t)=>{t.d(n,{A:()=>h});var r=t(79474),l=t(28923),a=t(66754),s=t(69729),i=t(41264);const o={tabList:"tabList_Lvt1",tabItem:"tabItem_jPx0"};var c=t(13274);function d(e){let{className:n,block:t,selectedValue:r,selectValue:s,tabValues:i}=e;const d=[],{blockElementScrollPositionUntilNextRender:u}=(0,a.a_)(),p=e=>{const n=e.currentTarget,t=d.indexOf(n),l=i[t].value;l!==r&&(u(n),s(l))},h=e=>{let n=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const t=d.indexOf(e.currentTarget)+1;n=d[t]??d[0];break}case"ArrowLeft":{const t=d.indexOf(e.currentTarget)-1;n=d[t]??d[d.length-1];break}}n?.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,c.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>d.push(e),onKeyDown:h,onClick:p,...a,className:(0,l.A)("tabs__item",o.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function u(e){let{lazy:n,children:t,selectedValue:l}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===l));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,c.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==l})))})}function p(e){const n=(0,s.u)(e);return(0,c.jsxs)("div",{className:(0,l.A)("tabs-container",o.tabList),children:[(0,c.jsx)(d,{...n,...e}),(0,c.jsx)(u,{...n,...e})]})}function h(e){const n=(0,i.A)();return(0,c.jsx)(p,{...e,children:(0,s.v)(e.children)},String(n))}},69729:(e,n,t)=>{t.d(n,{u:()=>h,v:()=>c});var r=t(79474),l=t(20241),a=t(6724),s=t(92439),i=t(6076),o=t(20758);function c(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return c(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:l}}=e;return{value:n,label:t,attributes:r,default:l}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,t])}function u(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.W6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,s.aZ)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(a.location.search);n.set(i,e),a.replace({...a.location,search:n.toString()})}),[i,a])]}function h(e){const{defaultValue:n,queryString:t=!1,groupId:l}=e,s=d(e),[i,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(n){if(!u({value:n,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[h,m]=p({queryString:t,groupId:l}),[f,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[l,a]=(0,o.Dv)(t);return[l,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:l}),b=(()=>{const e=h??f;return u({value:e,tabValues:s})?e:null})();(0,a.A)((()=>{b&&c(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),m(e),x(e)}),[m,x,s]),tabValues:s}}},79449:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var r=t(79474);const l={},a=r.createContext(l);function s(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:s(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.