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

53 Posts
Sort by:
Post not yet marked as solved
4 Replies
2.1k Views
I built the Gamekit Sample in apple/unityplugins for iOS and ran "_localPlayer = await GKLocalPlayer.Authenticate();" It worked fine up to the point where the GameCenter popup was displayed. However, the "OnRealtimeMatchmake()" and "OnToggleAccessPoint()" will result in the following error "MissingMethodException: Default constructor not found for type Apple.GameKit.Multiplayer.GKMatchRequest at System.RuntimeType.CreateInstanceMono" and "MissingMethodException: Default constructor not found for type Apple.GameKit.GKAccessPoint at System.RuntimeType.CreateInstanceMono" errors and does not work properly. Please tell me what is the problem here. The environment is as follows iPhone SE (iOS15.5), Unity2020.3.33f1, XCode13.4.1
Posted
by
Post not yet marked as solved
6 Replies
1.8k Views
public async void FetchItems() { try { var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems(); } catch(GameKitException exception) { Debug.LogError(exception); } } App hangs when calling GKLocalPlayer.Local.FetchItems(); No exception is caught. Apple.Core and Apple.GameKit plugins have been included in our project Reproducible with https://github.com/apple/unityplugins Both Unity 2020 and Unity 2021 iOS and tvOS Xcode Version 13.4.1
Posted
by
Post not yet marked as solved
2 Replies
1.7k Views
HELLO WORLD! I am currently developing an amazing Unity mini Game. The game development has come to the deploying stage. Using Unity allows me to deploy this game on MacOS, iOS, Android and Windows which is fantastic . However, I really need this game to have the iOS widget extension as a key feature on mobile. Just like the "Steve" dinosaur game which can be played in widget. I had seen a lot of tutorials and youtube videos but still cant find a solution which make Unity iOS app into a widget. If I really want to make widget Game on iOS, do I need to develop the whole game all over again in xcode or using GameKit? Really hoping there's a way to simply convert the Unity iOS app into a widget.
Posted
by
Post not yet marked as solved
5 Replies
1.7k Views
Hi, I'm using the Unity plugins to access Game Center; there's a button in our UI that I want to use to open the Game Center dashboard on a particular leaderboard. The code for that is as follows, adapted from the GameKitSample.cs file: var leaderboard = leaderboards.First(l => l.BaseLeaderboardId == MY_LEADER_ID); var gameCenter = GKGameCenterViewController.Init(leaderboard, GKLeaderboard.PlayerScope.Global, GKLeaderboard.TimeScope.AllTime); await gameCenter.Present(); // game never returns from here Debug.Log("Back from Present()..."); gameCenter.Dispose(); I can play the game, hit the button, and view the Game Center dashboard, opened to the given leaderboard as expected. However, when I quit the dashboard (hitting the X in the top-right corner), the dashboard fades out, but the game is now unresponsive. I did notice that elsewhere in GameKitSample.cs, we have the following: var match = await GKMatchmakerViewController.Request(request); match.Delegate.DidFailWithError += OnRealtimeMatchDidFailWithError; Digging around for help with GKGameCenterViewController, I did notice that most solutions involve giving the viewcontroller a callback, but in the Unity plugin I see no Delegate listed for GKGameCenterViewController. Is this class missing the delegate, & therefore missing the callback that would dispose of the view?
Posted
by
Post not yet marked as solved
1 Replies
2.1k Views
SPECIFIC ISSUE ENCOUNTERED I'm playing VR videos through my app using Metal graphics API with Cardboard XR Plugin for Unity. After the recent iOS 16 update (and Xcode 14 update too), videos in stereoscopic mode were flipped upside down and backwards. After trying to change sides manually in code, I only managed to show correct sides (it's not all upside down anymore), but when I turn the phone UP, the view is moving DOWN to the ground, and vice versa. Same issue for left-right phone moving. Also Unity-made popup question is shown on the wrong side (backside - shown in the video attachment) Here is the video of the issue for inverted (upside down flip) view: https://www.dropbox.com/s/wacnknu5wf4cif1/Everything%20upside%20down.mp4?dl=0 Here is the video of inverted moving: https://www.dropbox.com/s/7re3u1a5q81flfj/Inverted%20moving.mp4?dl=0 IMPORTANT: I did manage few times fixing it to work on local build, but when I build it for TestFlight, it is always inverted. WHAT I SUSPECT I found numerous other developers encountered this issue when they were using Metal. Back in the days when OpenGL ES 2 and 3 were still supported by Apple, it did fix the issue switching on one of those. But now since only Metal is supported with new Unity, there is no workaround, and also I would like to use Metal. DEVICE multiple iPhones running multiple iOS 16 versions has this issue. Specific OS version is 16.1 EXPECTED BEHAVIOR VR videos should show right side (not upside down image) and moving up should show upper part of the video, and vice versa. Same goes for left and right move. Currently everything is flipped, but not every time the same kind of flip. Sometimes in rare cases it's even shown correctly. VERSIONS USED What version of Google Cardboard are you using? Cardboard XR Plugin 1.18.1 What version of Unity are you using? 2022.1.13f1
Posted
by
Post not yet marked as solved
3 Replies
1.5k Views
Hi! I am trying to use the Apple Unity Plugins to add VoiceOver support to my game. I have built the plugins, and followed along with the video shown at https://developer.apple.com/videos/play/wwdc2022/10151/ However, I am seeing odd behaviour that I hope someone could help me with. For what it's worth, I am using Unity 2021.3.10f1 to build my game. I used the recommended version of Unity (2020.3.33f1) to build the plugins. Odd behaviour #1: I cannot work out what determines the order of AccessibilityNodes. If I have three GameObjects at the same level in the hierarchy, all marked with the trait button, using VoiceOver's single swipe right to go to each element in turn, seems to go to the last element first, then the first, then the second. At first I wondered if it was related to alphabetical order (GameObjects are called 'Music', 'SFX', 'Delete'), but renaming them to prefix numbers to the start of the names doesn't change the order. I have also tried removing the Label from the AccessibilityNode, but this did not help. Odd behaviour #1.5: The video says that Buttons don't need labels, and that if you use standard Unity UI controls, the label should be picked up automatically. I am not seeing this behaviour. I have a GameObject with a Button component, with a child GameObject with a TextMeshPro component. The label is not being picked up automatically. Odd behaviour #2: Once I have a button selected, I am unable to trigger it, with a VoiceOver 1-finger double tap. It just seems to repeat the label of the button. The GameObject I am trying to trigger just has a Button component, and the configuration looks the same as in the video. Does anyone have any successful experience using this plugin and could give me any insight? Thanks, Stephen
Posted
by
Post not yet marked as solved
1 Replies
1.2k Views
We are using the Apple Unity plugin (Gamekit) to authorize players, using a Game Center account. To get player info we run a task from the plugin, var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems(); But when this code run, there is an error in Xcode. The error is the following, Thread 1: EXC_BAD_ACCESS (code=257, address=0x2) MacOS 12.5 Monterey Unity 2021.3.4f1 XCode 14.2 AppleCore Unity Package - 1.0.2 AppleGameKit Unity Package - 1.0.3 Crashes when calling FetchItems in Unity Installed in iPhone XR (iOS 15.2.1)
Posted
by
Post not yet marked as solved
3 Replies
1.2k Views
Hi, When I try to import the com.apple.unityplugin.core-1.0.3.tgz package into Unity from my Windows development machine I get lots of errors like : Library\PackageCache\com.apple.unityplugin.core@077039b365c9\Editor\AppleBuildStep.cs(48,136): error CS0246: The type or namespace name 'PlistDocument' could not be found (are you missing a using directive or an assembly reference?) Is it possible to get around this so I can develop on Windows? Thanks
Posted
by
Post not yet marked as solved
3 Replies
1.1k Views
I am trying to get the Apple Core Haptics plug-in to work with Unity but am having issues when I try to build the project. I created a completely blank project with just the Core and CoreHaptics plug-ins installed. I then put in a single script (below) which is a replication of the script shared in the WWDC22 video on this subject. Then when I try to build and run that project I get a series of “Undefined symbol:” errors in Xcode. These effect the CoreHaptics, UIFeedbackGenerator frameworks. If I remove the script and just build an empty project with Core and CoreHaptics installed the build runs successfully. What am I doing wrong or missing that is causing these errors? using Apple.CoreHaptics; using System.Collections; using UnityEngine; public class Haptics : MonoBehaviour { private CHHapticEngine _hapticEngine; private CHHapticPatternPlayer _hapticPlayer; [SerializeField] private AHAPAsset _hapticAsset; private void PrepareHaptics() { _hapticEngine = new CHHapticEngine(); _hapticEngine.Start(); _hapticPlayer = _hapticEngine.MakePlayer(_hapticAsset.GetPattern()); } private void Play() { _hapticPlayer.Start(); } }
Posted
by
Post not yet marked as solved
5 Replies
1.8k Views
Trying to figure out a particularly odd crash report. Crashed: com.apple.root.user-initiated-qos.cooperative 0 GameCenterFoundation 0xe2054 __swift_project_boxed_opaque_existential_1 + 19952 1 libswift_Concurrency.dylib 0x41948 swift::runJobInEstablishedExecutorContext(swift::Job*) + 416 2 libswift_Concurrency.dylib 0x42868 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72 3 libdispatch.dylib 0x15944 _dispatch_root_queue_drain + 396 4 libdispatch.dylib 0x16158 _dispatch_worker_thread2 + 164 5 libsystem_pthread.dylib 0xda0 _pthread_wqthread + 228 6 libsystem_pthread.dylib 0xb7c start_wqthread + 8 We're using Unity 2021.3.16f1, we haven't touched the gamecenter login code for ages but this error started happening. It looks like it's only appearing on iOS 16.4 and subversions.
Posted
by
Post not yet marked as solved
0 Replies
625 Views
Looks like there's a fatal incorrect line in apple's unity plugins. It's easy to fix by editing that line in every file or by forcing your whole team to install extra modules to unity, but should probably be fixed. All of them start with "#if UNITY_EDITOR_OSX" Which is wrong because there are IOS-specific calls inside the code files, so I'm getting devs pinging me about their unity booting up and it saying IOS not found since they are on MAC without the IOS support installed. Ideally we would be able to use the lightest version of the editor since our builds are only done on the cloud.
Posted
by
Post not yet marked as solved
0 Replies
663 Views
Hi, We are facing a strange crash on iOS 16.4 and 16.4.1. The issue is not happening on iPad 16.4. We are getting very limited information on the crash, Here is call stack. 0 GameCenterFoundation 0x00000001f0498054 GKGroupActivityManager.reset() + 228 (GKGroupActivityManager.swift:450) 1 GameCenterFoundation 0x00000001f0496e8d GKGroupActivityManager.leave() + 1 (GKGroupActivityManager.swift:411) 2 GameCenterFoundation 0x00000001f04a67dd @objc closure #1 in GKGroupActivityManager.leave() + 1 3 GameCenterFoundation 0x00000001f04a6835 partial apply for @objc closure #1 in GKGroupActivityManager.leave() + 1 4 GameCenterFoundation 0x00000001f04a67f5 thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1 5 GameCenterFoundation 0x00000001f04a6839 thunk for @escaping @callee_guaranteed @Sendable @async () -> ()partial apply + 1 6 GameCenterFoundation 0x00000001f04a67f9 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 7 GameCenterFoundation 0x00000001f04a6899 thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A)specialized partial apply + 1 8 libswift_Concurrency.dylib 0x00000001c84d0dd9 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:496) Tried looking into GKGroupActivityManager but couldn't find any documentation regarding this. High number of our usser base is affected by this issue.
Posted
by
Post not yet marked as solved
0 Replies
791 Views
I recently integrated Unity IAP into my game and it works fine on android devices, but when I build a development build version on my iphone the purchase panel does not pop up, neither does the price get displayed. I recently agreed to the paid apps agreement, is that the reason why I am not able to see the purchase panel? Any kind of help would be appreciated.
Posted
by
Post not yet marked as solved
0 Replies
601 Views
Hi, I've tried multiple ways of solving this issue, including adding scripts, DISABLE Bitcode and non works. ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker." I am currently building a games with Unity, and trying to publish to test flight but no success at the moment. Non of the online solutions works on my side. Appreciate for your inputs, thanks in advance!
Posted
by
Post not yet marked as solved
1 Replies
1.4k Views
Do I understand correctly that to use Unity (Universal Render Pipeline) for Vision Pro's fully immersive apps, we can normally use Unity's Shader Graph to make custom shaders; but for immersive mixed reality apps, we cannot use Shader Graph anymore, instead, we have to create shaders for Unity in Reality Composer? How does bringing Reality Composer's shader into Unity work? Is it simply working in Unity or will it require special adaptation for Unity? Are there some cases to avoid using Reality Composer, and use Unity's Shader Graph for immersive Vision apps? For instance, we may lose real-time lighting adaptation for virtual objects, but on the other hand, we will be able to use Shader Graph.
Posted
by
Post not yet marked as solved
0 Replies
393 Views
the device orientation message maybe wrong when running unity app on ios 16, more information about this question is https://forum.unity.com/threads/game-may-start-with-incorrect-orientation.1410231/
Posted
by
Post marked as solved
3 Replies
1.7k Views
I have a Unity project, after setting up Apple.Gamekit plugin, it show up some error when build with XCode: ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/mac/Documents/Bonex/BoneX_demo1/iOSBuild_demo2/Libraries/libiPhone-lib.a(unwind_test_arm64.o) Undefined symbols for architecture arm64: "_GKLocalPlayer_Authenticate", referenced from: _GKLocalPlayer_GKLocalPlayer_Authenticate_mA13EED25E9E6BC8EAA0DE8E36D389AC904B41435 in Apple.GameKit.o (maybe you meant: _GKLocalPlayer_GKLocalPlayer_Authenticate_mA13EED25E9E6BC8EAA0DE8E36D389AC904B41435, _GKLocalPlayer_Authenticate_m3BBD62A177560D3F93691F97581B484A6EBA0836 ) "_GKLocalPlayer_GetIsMultiplayerGamingRestricted", referenced from: _GKLocalPlayer_GKLocalPlayer_GetIsMultiplayerGamingRestricted_m347F15CBE262C877190B5C7F4B55AFAD595705D5 in Apple.GameKit.o (maybe you meant: _GKLocalPlayer_GKLocalPlayer_GetIsMultiplayerGamingRestricted_m347F15CBE262C877190B5C7F4B55AFAD595705D5) "_GKLocalPlayer_GetIsPersonalizedCommunicationRestricted", referenced from: _GKLocalPlayer_GKLocalPlayer_GetIsPersonalizedCommunicationRestricted_mB1E3D7AE957AAA19E6ABBDCDEAD9821B09EB1DC1 in Apple.GameKit.o (maybe you meant: _GKLocalPlayer_GKLocalPlayer_GetIsPersonalizedCommunicationRestricted_mB1E3D7AE957AAA19E6ABBDCDEAD9821B09EB1DC1) "_GKLocalPlayer_GetIsUnderage", referenced from: _GKLocalPlayer_GKLocalPlayer_GetIsUnderage_mF266E6F8AA10922F3B02ED3A877D3C403EA46045 in Apple.GameKit.o (maybe you meant: _GKLocalPlayer_GKLocalPlayer_GetIsUnderage_mF266E6F8AA10922F3B02ED3A877D3C403EA46045) "_NSError_Free", referenced from: _NSError_NSError_Free_m0AFB1ED4BF090D6E5276479A1F53680D4FD47A4A in Apple.Core.o (maybe you meant: _NSError_NSError_Free_m0AFB1ED4BF090D6E5276479A1F53680D4FD47A4A) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) The plugin I added, which is provided by Apple: https://github.com/apple/unityplugins My : build appunityplugin used 2020.3.33f1 XCode to version 14.3.1 Please help! Thank you!!!
Posted
by
Post not yet marked as solved
1 Replies
824 Views
We are upgrading our ObjC-based iOS multiplayer game to Unity, so we plan to use the Unity Apple plugins. Specifically, we want to use Apple.Core and Apple.Gamekit packages. Cloned the project from https://github.com/apple/unityplugins Built the package using Unity 2020.3.33f1 In the Unity Editor, used Windows > Package Manager and added both packages from the tarball. No errors; all looks good. 5, Built & Run the project and installed the game on an iPhone 13 device. 6. Once the game starts, we see the following errors, and the game quits. Errors: '/private/preboot/Cryptexes/OS/usr/lib/swift/AppleCoreNative.framework/AppleCoreNative' (no such file), '/private/var/containers/Bundle/Application/0CF8E689-36C1-4AA6-9CF6-1E078EC1A3FB/Game.app/Frameworks/AppleCoreNative.framework/AppleCoreNative' (no such file), '/private/var/containers/Bundle/Application/0CF8E689-36C1-4AA6-9CF6-1E078EC1A3FB/Game.app/Frameworks/UnityFramework.framework/Frameworks/AppleCoreNative.framework/AppleCoreNative' (no such file), '/private/var/containers/Bundle/Application/0CF8E689-36C1-4AA6-9CF6-1E078EC1A3FB/Game.app/Frameworks/AppleCoreNative.framework/AppleCoreNative' (no such file), '/System/Library/Frameworks/AppleCoreNative.framework/AppleCoreNative' (no such file, not in dyld cache) Anyone, please help us to resolve the above issue?
Posted
by