66using UnityEngine . UI ;
77using Immutable . Passport . Core . Logging ;
88
9- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
9+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
1010using Vuplex . WebView ;
1111#endif
1212
@@ -20,8 +20,8 @@ namespace Immutable.Passport
2020 public class AndroidVuplexWebView : IPassportWebView
2121 {
2222 private const string TAG = "[AndroidVuplexWebView]" ;
23-
24- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
23+
24+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
2525 private CanvasWebViewPrefab ? _webViewPrefab ;
2626#endif
2727 private readonly Dictionary < string , Action < string > > _jsHandlers = new Dictionary < string , Action < string > > ( ) ;
@@ -33,7 +33,7 @@ public class AndroidVuplexWebView : IPassportWebView
3333 public event Action ? OnLoadStarted ;
3434
3535 // Safe access - check initialization
36- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
36+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
3737 public bool IsVisible => _webViewPrefab ? . Visible ?? false ;
3838 public string CurrentUrl => _webViewPrefab ? . WebView ? . Url ?? "" ;
3939#else
@@ -54,7 +54,7 @@ public void Initialize(PassportWebViewConfig config)
5454 return ;
5555 }
5656
57- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
57+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
5858 try
5959 {
6060 PassportLogger . Info ( $ "{ TAG } Initializing Vuplex WebView...") ;
@@ -73,7 +73,7 @@ public void Initialize(PassportWebViewConfig config)
7373#endif
7474 }
7575
76- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
76+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
7777 private async UniTaskVoid InitializeAsync ( PassportWebViewConfig config )
7878 {
7979 try
@@ -134,7 +134,7 @@ private async UniTaskVoid InitializeAsync(PassportWebViewConfig config)
134134
135135 public void LoadUrl ( string url )
136136 {
137- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
137+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
138138 if ( ! _isInitialized || _webViewPrefab ? . WebView == null )
139139 {
140140 PassportLogger . Error ( $ "{ TAG } Cannot load URL - WebView not initialized") ;
@@ -149,7 +149,7 @@ public void LoadUrl(string url)
149149
150150 public void Show ( )
151151 {
152- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
152+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
153153 if ( _webViewPrefab != null )
154154 {
155155 _webViewPrefab . Visible = true ;
@@ -159,7 +159,7 @@ public void Show()
159159
160160 public void Hide ( )
161161 {
162- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
162+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
163163 if ( _webViewPrefab != null )
164164 {
165165 _webViewPrefab . Visible = false ;
@@ -169,7 +169,7 @@ public void Hide()
169169
170170 public void ExecuteJavaScript ( string js )
171171 {
172- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
172+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
173173 if ( ! _isInitialized || _webViewPrefab ? . WebView == null )
174174 {
175175 PassportLogger . Error ( $ "{ TAG } Cannot execute JavaScript - WebView not initialized") ;
@@ -184,7 +184,7 @@ public void RegisterJavaScriptMethod(string methodName, Action<string> handler)
184184 {
185185 _jsHandlers [ methodName ] = handler ;
186186
187- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
187+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
188188 if ( _isInitialized && _webViewPrefab ? . WebView != null )
189189 {
190190 ExecuteJavaScript ( $ "window.{ methodName } =d=>window.vuplex?.postMessage('{ methodName } :'+(typeof d==='object'?JSON.stringify(d):d))") ;
@@ -194,7 +194,7 @@ public void RegisterJavaScriptMethod(string methodName, Action<string> handler)
194194
195195 public void Dispose ( )
196196 {
197- #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
197+ #if UNITY_ANDROID && ! UNITY_EDITOR && VUPLEX_AVAILABLE && VUPLEX_AVAILABLE
198198 if ( _webViewPrefab != null )
199199 {
200200 _webViewPrefab . Destroy ( ) ;
0 commit comments