Skip to content

Commit

Permalink
fix bug prevent create player if pad has no iframeId
Browse files Browse the repository at this point in the history
  • Loading branch information
imvenx committed Dec 16, 2023
1 parent 71bc89f commit 9ff66e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/ArcaneLibrary/Core/Scripts/Arcane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Arcane : MonoBehaviour
public static List<string> IframeViewsIds = new List<string>();
public static List<string> IframePadsIds = new List<string>();
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();

Expand Down
2 changes: 2 additions & 0 deletions Assets/ArcaneLibrary/Example/Scripts/AViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<APlayerController>();
playerComponent.Initialize(pad);
Expand Down

0 comments on commit 9ff66e1

Please sign in to comment.