Apple Unity Plug-Ins

RSS for tag

Connect your game to Game Center, Core Haptics, PHASE audio, accessibility, and game controller frameworks.

Posts under Apple Unity Plug-Ins tag

40 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

GKGameCenterViewController won't turn off.
GKGameCenterViewController won't turn off. With Core and GameKit from GitHub apple/unityplugins, I succeeded in logging in and displaying GKGameCenterViewController. Other leaderboards and everything work fine, but when I press X on GameCenter to return to the game, nothing happens. I tried debugging by printing logs here and there in the plugin to check, but I didn't get any results. When I press X, I couldn't get any logs or responses. It was like a button with no listener attached. No, it was more like an image. Based on the community posts that said it worked fine before, it seems that the recent GameCenter update was not applied to the plugin, was omitted, or changed, causing a mismatch.
1
0
124
2d
Crash after using Apply unity plugin (GameKit-3.0.0)
Hi, I tried to save the game progress using the official Apple plugin for Unity but the crash happened when I active the "iCloud Documents" inside capabilities and when deactivated it this error message appeared: Code=27 Domain=GKErrorDomain Description=The requested operation could not be completed because you are not signed in to iCloud or have not enabled iCloud Drive. (UbiquityContainerUnavailable) Authentication with Game Center works fine using the Core plugin, but nothing works correctly when I use the GameKit plugin. Note: I already active iCloud for app Identifier. Tichnecal informations: Unity version: 2022.3.47f1 LTS XCode 16 Swift 6 GameKit-3.0.0 (Apply unity plugin) Core-3.1.5 (Apply unity plugin)
2
0
203
1w
[Unity & Xcode(ARKit, RealityKit) & visionOS] Is it possible to combine a project made with Unity and a project made with Xcode into one app?
Hi, I’m working on a portfolio project for Vision Pro these days. I have two projects and each of projects are made with Unity and made with Xcode(using ARKit and RealityKit tracking feature). Is it able to combine these two projects in an app? For example, using the buttons made with SwiftUI in a Reality Composer Pro, jumping to a scene in Unity, and back from a scene in Unity to a scene in Reality Composer Pro in an app.
1
0
324
3w
Custom Progressive mode --> Unity/Polyspatial not working
I'm setting: .immersionStyle(selection: .constant(.progressive(0.1...1.0, initialAmount: 0.1)), in: .progressive(0.1...1.0, initialAmount: 0.1)) In UnityVisionOSSettings.swift before build out in Xcode. I'm having an issue where this only works on occasion. Seems random. I'll either get no immersion level available (crown dial is greyed out and no changes can be made) or it will only allow 0.5 - 1.0 immersion (dial will go below 0.5 but springs back to 0.5 when released). With no changes to my setup or how I'm setting immersionStyle I've been able to get this to work as I would expect. Wondering if there is some bug that would be causing this to fail. I've tested a simple NativeSDK progressive immersion style with same code for custom setting and it works everytime, so it's something related to Unity. Here is the entire UnityVisionOSSettings that, from as far as I can tell, are controlling this: `// GENERATED BY BUILD import Foundation import SwiftUI import PolySpatialRealityKit import UnityFramework let unityStartInBatchMode = false extension UnityPolySpatialApp { func initialWindowName() -> String { return "Unbounded" } func getAllAvailableWindows() -> [String] { return ["Bounded-0.500x0.500x0.500", "Unbounded"] } func getAvailableWindowsForMatch() -> [simd_float3] { return [] } func displayProviderParameters() -> DisplayProviderParameters { return .init( framebufferWidth: 1830, framebufferHeight: 1600, leftEyePose: .init(position: .init(x: 0, y: 0, z: 0), rotation: .init(x: 0, y: 0, z: 0, w: 1)), rightEyePose: .init(position: .init(x: 0, y: 0, z: 0), rotation: .init(x: 0, y: 0, z: 0, w: 1)), leftProjectionHalfAngles: .init(left: -1, right: 1, top: 1, bottom: -1), rightProjectionHalfAngles: .init(left: -1, right: 1, top: 1, bottom: -1) ) } @SceneBuilder var mainScenePart0: some Scene { ImmersiveSpace(id: "Unbounded", for: UUID.self) { uuid in PolySpatialContentViewWrapper(minSize: .init(1.000, 1.000, 1.000), maxSize: .init(1.000, 1.000, 1.000)) .environment(\.pslWindow, PolySpatialWindow(uuid.wrappedValue, "Unbounded", .init(1.000, 1.000, 1.000))) .onImmersionChange() { oldContext, newContext in PolySpatialWindowManagerAccess.onImmersionChange(oldContext.amount, newContext.amount) } KeyboardTextField().frame(width: 0, height: 0).modifier(LifeCycleHandlerModifier()) } defaultValue: { UUID() } .upperLimbVisibility(.automatic) .immersionStyle(selection: .constant(.progressive(0.1...1.0, initialAmount: 0.1)), in: .progressive(0.1...1.0, initialAmount: 0.1)) WindowGroup(id: "Bounded-0.500x0.500x0.500", for: UUID.self) { uuid in PolySpatialContentViewWrapper(minSize: .init(0.100, 0.100, 0.100), maxSize: .init(0.500, 0.500, 0.500)) .environment(\.pslWindow, PolySpatialWindow(uuid.wrappedValue, "Bounded-0.500x0.500x0.500", .init(0.500, 0.500, 0.500))) KeyboardTextField().frame(width: 0, height: 0).modifier(LifeCycleHandlerModifier()) } defaultValue: { UUID() } .windowStyle(.volumetric).defaultSize(width: 0.500, height: 0.500, depth: 0.500, in: .meters).windowResizability(.contentSize) .upperLimbVisibility(.automatic) .volumeWorldAlignment(.gravityAligned) } @SceneBuilder var mainScene: some Scene { mainScenePart0 } struct LifeCycleHandlerModifier: ViewModifier { func body(content: Content) -> some View { content .onOpenURL(perform: { url in UnityLibrary.instance?.setAbsoluteUrl(url.absoluteString) }) } } }`
3
0
295
Oct ’24
ITMS-90426: Invalid Swift Support when uploading VisionOS app to Appstore Connect with dylib
I'm trying to upload a build to app store connect. It's a build from a Unity project with the polyspatial SDK, and I also need to include a c++ library, which I've added as a dylib signed with the same provisioning profile as the app. The profile is an Apple Distribution profile created from an enterprise account. It succesfully uploads to Appstore connect, but fails with the following error message: ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it. This is unhelpful as I'm using a current version of Xcode. I've read that it's a provisioning issue, but I'm using the provisioning profile for apple distribution on an enterprise account, not an ad hoc profile. I've tried manually adding the SwiftSupport folder from the Xcode toolchain to the ipa/xarchive, resign and upload with Transporter, but that doesn't work. After spending a day trying to troubleshoot this, I'm at a loss. Any help with this is much appreciated. Note: I can sideload the app onto an AVP with an ad hoc build and ad hoc provisioning profile (I've added the signed dylib to build phases Link with Libraries and Embed Frameworks). Somehow this doesn't need the SwiftSupport?
2
0
518
Oct ’24
Error "No Apple native plug-in libraries found." when importing freshly built plugins into Unity
I just built Core and GameKit without errors. The command line I used was the following: python3 build.py -p Core GameKit -m macOS -c "Apple Development ID (redacted)" When importing these packages into Unity, as soon as the editor refreshes I get these errors: DllNotFoundException: GameKitWrapper assembly:<unknown assembly> type:<unknown type> member:(null) And DllNotFoundException: AppleCoreNativeMac assembly:<unknown assembly> type:<unknown type> member:(null) And Apple Unity Plug-ins] No Apple native plug-in libraries found. Were the libraries built with the build script (build.py), xcodebuild, or Xcode? Was any output generated from the build script/tool? Were there any errors or issues? Please check to ensure that libraries (.a, .framework, or .bundle files) were created and saved to each plug-in's "NativeLibraries~" folder. I made sure that the libraries were saved to this NativeLibraries folder. I made sure to update xcode, python, npm and Unity to the latest version, got the most recent commity from Github (Sept. 17th) but the errors persist. The errors also occur right as the game starts in a built player. Also occurs in a blank Unity project, where I tested both 2022.3.17f and 2022.3.48f. The versions I was trying to import was Core 3.1.4 and GameKit 3.0.0. Same issue with Core 3.1.3 and Gamekit 2.2.2. Last version I tried that works was Core 1.05 and GameKit 1.04. I haven't seen anyone else encounter this on these forums so I'm guessing that I'm personally doing something wrong rather than there being an issue with the plugins themselves, but what am I doing wrong?
4
0
515
Oct ’24
Unity/PolySpatial GameController framework failing to load
I have a simple example of a motion matching (MxM for Unity) character controller that uses Unity's input system and gamepad support. In editor the scene and inputs work as expected. When I build to headset the app stops at an initialization step where my game controller should kick in. The app doesn't crash but my character is frozen in A-Pose and doesn't respond to input. I'm wondering if this error I'm seeing in the logs is what's causing it? And if so how do I fix it? error 15:56:11.724200-0700 PolySpatialProjectTemplate NSBundle file:///System/Library/Frameworks/GameController.framework/ principal class is nil because all fallbacks have failed I'm using Xcode 16 beta 6 Unity 6000.0.17f1 VisionOS 2.0 beta 9
2
0
466
Oct ’24
Using Native ARKit Object Tracking in Unity
Hello, Has anyone had success with implementing object tracking in Unity or adding native tracking capability to the VisionOS project built from Unity? I am working on an application for Vision Pro mainly in Unity using Polyspatial. The application requires me to track objects and make decisions based on tracked object's location. I was able to create an object tracking application on Native Swift, but could not successfully combine this with my Unity project yet. Each separate project (Main Unity app using Polyspatial and the native app on Swift) can successfully build and be deployed onto VisionPro. I know that Polyspatial and ARFoundation does not have support for ARKit's object tracking feature for VIsion Pro as of today, and they only support image tracking inside Unity. For that reason I have been exploring different ways of creating a bridge for two way interaction of the native tracking functionality and the other functionality in Unity. Below are the methods I tried and failed so far: Package the tracking functionality as a Swift Plugin and access this in Unity, and then build for Vision Pro: I can create packages and access them for simple exposed variables and methods, but not for outputs and methods from ARKit, which throw dependency errors while trying to make the swift package. Build project from Unity to VIsion Pro and expose a boolean to start/stop tracking that can be read by the native code, and then carry the tracking classes into the built project. In this approach I keep getting an error that says _TrackingStateChanged cannot be found, which is the class that exposes the bool toggled by the Unity button press: using System.Runtime.InteropServices; public class UnityBridge { [DllImport("__Internal")] private static extern void TrackingStateChanged(bool isTracking); public static void NotifyTrackingState() { // Call the Swift method TrackingStateChanged(TrackingStartManager.IsTrackingActive()); } } This seems to be translated to C++ code in the ill2cpp output from Unity, and even though I made sure that all necessary packages were added to the target, I keep receiving this error. from the UnityFramework plugin: Undefined symbol: _TrackingStateChanged I have considered extending the current Image Tracking approach in ARFoundation to include object tracking, but that seems to be too complicated for my use case and time frame for now. The final resort will be to forego Unity implementation and do everything in native code. However, I really want to be able to use Unity's conveniences and I have very limited experience with Swift development.
0
1
429
Sep ’24
Open Leaderboard using Apple Unity Plugin GameKit
This may be a bit dumb but I've really been having trouble with understanding the documentation for Apple's Unity Plugins. I wanted to implement Game Center functionality on my game. So far the only line of code I've managed to get working is the authentication, in which I did async void Start() { await Login(); } public async Task Login() { if (!GKLocalPlayer.Local.IsAuthenticated) { var player = await GKLocalPlayer.Authenticate(); var localPlayer = GKLocalPlayer.Local; ] } However, I'm at a complete loss as to how to open leaderboards. I followed the documentation given: void OpenLeaderboard() { var allLeaderboards = await GKLeaderboard.LoadLeaderboards(); var filteredLeaderboards = await GKLeaderboard.LoadLeaderboards("leaderboardIwant1"); } But it did not work. What did I do wrong? Am I missing a function to get it to work? Why can't Apple write proper documentation to properly implement this in a simple way? My apologies for my frustration. Up until now I've used another plugin from the Unity Asset Store which is shockingly easy to use, but I decided to attempt to use Apple's system because the plugin I had used deprecated functions and I was afraid the App Store would not approve it. But Apple's own plugins are stunningly opaque and hard to test. As additional questions (but not the main ones), I'm also completely at a loss how to submit scores or load specific leaderboards and Apple's documentation does nothing to help there either. Any help or thoughts are appreciated. Thanks.
1
0
449
Jul ’24
PHASE on Vision OS 2.0 beta in Unity
Hi, I'm looking to implement PHASEStreamNode in Unity, but the current provided PHASE library for Unity doesn't contain this new typos of nodes yet. https://developer.apple.com/documentation/phase/phasestreamnode When you will be looking into releasing the beta of the Unity Plugins as well? This is very important for spatial audio in Unity to be consistent with Apple's standards. Best, Antonio
1
1
469
Jul ’24
Unity Apple Plugin GameKit Error 37 when sending build to app review
I'm using the Apple Unity Plugins to use Game Center to authenticate Playfab accounts for my game and when I test this on testflight, everything works fine for me and the people I've tested with, however, when I send the build to review, they are getting GameKitException 37 which states "This game is not listed in a marketplace that supports Game Center" and upon further research I found this page https://developer.apple.com/documentation/gamekit/gkerror/code/appunlisted which I'm assuming is the same thing. This seems to suggest that I need my app to be listed on the App Store which is strange because this has created a what comes first, the chicken or the egg problem. I need to pass review to get the game listed in the App Store and they can't test the game because accounts cannot be authenticated with Game Center which apparently needs to be listed on the App Store. So far, I can't find the reason why this doesn't happen on testflight and only happens when I send it to review. I opened a ticket to Apple Developer Support and haven't recieved a response. I asked app review about it and they replied "Hello, Thank you for your response. Since all apps must pass App Review before they can be approved, it should not be necessary to have a "store page". We look forward to reviewing your app once all issues have been addressed and the new build has been received and queued for review. Best regards, App Review" Which doesn't really help me. I am quite pressed for time and I really need assistance in resolving this issue which I cannot replicate. Has anyone encountered this issue or know how to solve it?
5
1
1.4k
Aug ’24
Unity GameCenter Leaderboard issue
Hey, i have created a game in unity with the apple core and apple gamekit plugins present. I setup 5 leaderboards on the app store connect. I made a unity build and did the whole testflight build loop to test everything. When i open my gamecenter panel via the button i see my leaderboards but they show as MISSING TITLE which is weird because i have for sure set them up correctly they have a leaderboard reference name and leaderboard id as well. When debugging i can see that when i call my submit score function it gets submitted with no error but then i also dont see the score appear anywhere . Keep in mind the leaderboards are not live and are being tested on testflight first
1
0
689
Jun ’24
No Apple plug-in library path found
Hey! I'm facing a problem I have 0 idea how to solve it. I'm building a project with Unity 2022.3.21 for visionOS and after a lot of exhausting problems I'm having the last one, I am kinda new to Xcode. I get the error "No Apple plug-in library path found", at the root of the project there Xcode should find the ApplePluginLibraries folder, and it's actually there with two folders inside Apple.Core and Apple.GameKit. Xcode is saying the path was not found and I can see it exists through finder. In Search Paths > Framework Search Paths I have: $(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit $(PROJECT_DIR)/ApplePluginLibraries/Apple.Core Also in Other Linker Flags I have: -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.Core I was having a few errors and the last one is: Command PhaseScriptExecution failed with a nonzero exit code, and the description says about the path not found. My info: MacOS: Apple M1 Pro Sonoma 14.5 Xcode: 15.4 Unity: 2022.3.21f1 Any idea? Thanks!!
7
4
695
Aug ’24
Vision Pro Unity Build and Xcode (Swift) vision os build merge
I have a unity scene which i have created for vision pro and i have also created a biomatric authentication application for vision os using Xcode and swift. What i want to do is call unity scene after the authentication has taken place form the xcode. now i have seen medium post but it only shows how we can do that for apps, I am not bale to do that for vision Pro I have followed this post : https://medium.com/mop-developers/launch-a-unity-game-from-a-swiftui-ios-app-11a5652ce476 All this i am doing because as far as i know Apple vision pro is not currently supporting optic id authentication with unity's polyspatial plugin. Any help on this will be appreciated. Thank you in advace.
1
0
738
May ’24
CloudKit + CloudSave for Unity not building in Xcode
I'm trying to integrate the option to the player to save their data in the cloud, I integrate the CloudKit, change some stuff to make it work and build in Xcode to my phone. But when I try to integrate the CloudSave, 50 unnasigned symbols jump,like this one: Undefined symbol: _CKContainer_Default I managed to fix them by updating the recommended settings for Xcode. But then 4 more errors appear: Sandbox: il2cpp(12538) deny(1) file-read-data /Users/Username/Test Apple Kit 2022/Build/Il2CppOutputProject/IL2CPP/build/deploy_arm64/il2cpp So, don't let me build and I've looked everywhere but no one seems to had this same error
1
0
593
May ’24