From 9ff66e18fdf22d5c65b89ea20e359f6f8da0dcd0 Mon Sep 17 00:00:00 2001 From: imvenx Date: Sat, 16 Dec 2023 18:16:17 +0100 Subject: [PATCH] fix bug prevent create player if pad has no iframeId --- Assets/ArcaneLibrary/Core/Scripts/Arcane.cs | 2 +- Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/ArcaneLibrary/Core/Scripts/Arcane.cs b/Assets/ArcaneLibrary/Core/Scripts/Arcane.cs index e984eb4..e66293a 100644 --- a/Assets/ArcaneLibrary/Core/Scripts/Arcane.cs +++ b/Assets/ArcaneLibrary/Core/Scripts/Arcane.cs @@ -19,7 +19,7 @@ public class Arcane : MonoBehaviour public static List IframeViewsIds = new List(); public static List IframePadsIds = new List(); public static ArcanePad Pad { get; private set; } - public string LibraryVersion { get; } = "1.4.0"; + public string LibraryVersion { get; } = "1.4.1"; [DllImport("__Internal")] private static extern void SetFullScreen(); diff --git a/Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs b/Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs index 6a5a3dc..44344b7 100644 --- a/Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs +++ b/Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs @@ -65,6 +65,8 @@ async void Awake() void createPlayer(ArcanePad pad) { + if (string.IsNullOrEmpty(pad.IframeId)) return; + GameObject newPlayer = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity); APlayerController playerComponent = newPlayer.GetComponent(); playerComponent.Initialize(pad);