Skip to content

Commit d942218

Browse files
committed
feat: update webview class and interface to handle ios and andriod
1 parent 5528862 commit d942218

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/Packages/Passport/Runtime/Scripts/Private/UI/WindowsPassportWebView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using System.Runtime.InteropServices;
1919
#endif
2020

21-
#if !IMMUTABLE_CUSTOM_BROWSER && UNITY_STANDALONE_WIN
21+
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_EDITOR && UNITY_EDITOR_WIN))
2222
using VoltstroStudios.UnityWebBrowser;
2323
using VoltstroStudios.UnityWebBrowser.Core;
2424
using VoltstroStudios.UnityWebBrowser.Core.Engines;
@@ -32,7 +32,7 @@
3232

3333
namespace Immutable.Passport
3434
{
35-
#if !IMMUTABLE_CUSTOM_BROWSER && UNITY_STANDALONE_WIN
35+
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_EDITOR && UNITY_EDITOR_WIN))
3636
/// <summary>
3737
/// Windows implementation of IPassportWebView using Volt Unity Web Browser (UWB)
3838
/// Wraps all UWB-specific functionality in a clean, platform-agnostic interface

src/Packages/Passport/Runtime/Scripts/Public/PassportUI.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,15 @@ private void CreateWebView()
194194
/// </summary>
195195
private IPassportWebView CreatePlatformWebView()
196196
{
197-
#if !IMMUTABLE_CUSTOM_BROWSER && UNITY_STANDALONE_WIN
197+
#if !IMMUTABLE_CUSTOM_BROWSER && (UNITY_STANDALONE_WIN || (UNITY_EDITOR && UNITY_EDITOR_WIN))
198198
PassportLogger.Info($"{TAG} Creating Windows WebView (UWB)");
199199
return new WindowsPassportWebView(rawImage, this);
200200
#elif UNITY_IOS && !UNITY_EDITOR
201201
PassportLogger.Info($"{TAG} Creating iOS WebView (WKWebView)");
202-
// TODO: Implement iOS WebView
203-
throw new NotImplementedException("iOS WebView not yet implemented");
202+
return new iOSPassportWebView(rawImage, this);
204203
#elif UNITY_ANDROID && !UNITY_EDITOR
205204
PassportLogger.Info($"{TAG} Creating Android WebView");
206-
// TODO: Implement Android WebView
207-
throw new NotImplementedException("Android WebView not yet implemented");
205+
return new AndroidPassportWebView(rawImage, this);
208206
#elif UNITY_STANDALONE_OSX
209207
PassportLogger.Info($"{TAG} Creating macOS WebView (WKWebView)");
210208
// TODO: Implement macOS WebView

0 commit comments

Comments
 (0)