Skip to content

Commit

Permalink
Merge pull request #3273 from KBVE/patch-atomic-vuplex-debug-again-11…
Browse files Browse the repository at this point in the history
…-18-2024-1731952415

[CI] Merge patch-atomic-vuplex-debug-again-11-18-2024-1731952415 into dev
  • Loading branch information
h0lybyte authored Nov 18, 2024
2 parents 0949e9d + 2ee8be8 commit 0536b0a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 8 additions & 1 deletion apps/kbve.com/src/content/journal/11-18.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ import { Adsense, Tasks } from '@kbve/astropad';
**WebGL**

Adjusted the WebGL build, going to push up another commit as well.
We do need to adjust the supabase login, making sure that it works for both Standalone and WebGL.
We do need to adjust the supabase login, making sure that it works for both Standalone and WebGL.

- 12:50PM

**Vuplex**

The `Vuplex` provider provides a way to utilize the webview but we want to focus on making it work through our package.
However it seems that it crashes on the macbook, so I am going to try to make it work on the windows desktop.
5 changes: 3 additions & 2 deletions packages/kilonet/Kbve.Kilonet.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"name": "Kbve.Kilonet",
"rootNamespace": "KBVE.Kilonet",
"references": [
"Vuplex.WebView",
"Vuplex.WebView",
"Supabase.Core",
"Supabase.Functions",
"Supabase.Gotrue",
"Supabase.Postgrest",
"Supabase.Realtime",
"Supabase.Storage"
"Supabase.Storage",
"Cysharp.Threading.Tasks"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
4 changes: 1 addition & 3 deletions packages/kilonet/kilonet/Utils/VuplexHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace KBVE.Kilonet.Utils
{
public class VuplexHelper : MonoBehaviour
{

public Canvas CanvasObject;
public CanvasWebViewPrefab CanvasWebViewPrefab;
public IWebView CanvasWebViewPrefabView;
Expand Down Expand Up @@ -46,15 +47,12 @@ private async UniTask InitializeWebView()
return;
}

// Initialize the CanvasWebViewPrefab
await CanvasWebViewPrefab.WaitUntilInitialized();

// Dynamically assign the WebView to CanvasWebViewPrefabView
if (CanvasWebViewPrefab.WebView != null)
{
CanvasWebViewPrefabView = CanvasWebViewPrefab.WebView;

// Subscribe to the WebView's MessageEmitted event
CanvasWebViewPrefabView.MessageEmitted += OnMessageReceived;

Debug.Log("Vuplex WebView successfully initialized and ready to receive messages.");
Expand Down

0 comments on commit 0536b0a

Please sign in to comment.