Plug-in and play: Add Apple frameworks to your Unity game projects

RSS for tag

Discuss the WWDC22 Session Plug-in and play: Add Apple frameworks to your Unity game projects

Posts under wwdc2022-10065 tag

4 Posts

Post

Replies

Boosts

Views

Activity

GKLocalPlayer.FetchItems BAD ACCESS
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)
3
0
1.6k
Oct ’23
Game Kit exception when trying to fetch leaderboards
I'm using Unity 2020.3.33 and an external asset too update and fetch leaderboards, when I replaced the code to use the unity one I see that crashes when fetching leaderboards. Authentication works fine but this happens when I try to fetch my leaderboards: Code: var leaderboards = await GKLeaderboard.LoadLeaderboards(GameCenter.LeaderBoards.Age.ToString()); Stack:  Default constructor not found for type Apple.Core.Runtime.NSMutableArrayString  StackTrace: at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0  at System.Activator.CreateInstance[T] () [0x00000] in <00000000000000000000000000000000>:0  at Apple.Core.Runtime.ReflectionUtility.CreateInstanceOrDefault[T] (System.IntPtr pointer) [0x00000] in <00000000000000000000000000000000>:0 at Apple.Core.Runtime.NSMutableArrayFactory.Init[TBase,TElement] () [0x00000] in <00000000000000000000000000000000>:0  at Apple.GameKit.Leaderboards.GKLeaderboard.LoadLeaderboards (System.String[] identifiers) [0x00000] in <00000000000000000000000000000000>:0  at UIGovHighscore+d__34.MoveNext () [0x00000] in <00000000000000000000000000000000>:0  at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0  at UIGovHighscore.ReadResidentRankV2New () [0x00000] in <00000000000000000000000000000000>:0
1
0
1.8k
Aug ’22
Apple Accessibility in 2020.3.32f1 and Testing in Editor
Hi folks, I'm excited that Apple has released these accessibility tools to use with Unity and I hopped on pretty quick to add them to my project. I've gotten them implemented in, but I have a few simple questions. In this video, the person running the tutorial uses 2020.3.32f1 to import all the Apple packages into the sample project, but in the Markdown files, it specifically mentions to use 2020.3.33f1. I was wondering if there is any issue to continue using 2020.32f1 with Apple Accessibility? For certain reasons, I am unable to update the project beyond that version for now. Second question I have, is there a way to test out the Apple Accessibility scripts and plugin within the editor? Is there a way to enable it for quick debugging? Or do I have to build to an iPhone to test the project's accessibility scripts? Thanks!
0
0
1.8k
Aug ’22
GKLocalPlayer.FetchItems BAD ACCESS
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)
Replies
3
Boosts
0
Views
1.6k
Activity
Oct ’23
GameKit bug: Default constructor not found for type Apple.Core.Runtime.NSMutableArrayString
When trying to fetch the leaderboards we get this exception. Default constructor not found for type Apple.Core.Runtime.NSMutableArrayString. Please help
Replies
1
Boosts
0
Views
1.6k
Activity
Aug ’22
Game Kit exception when trying to fetch leaderboards
I'm using Unity 2020.3.33 and an external asset too update and fetch leaderboards, when I replaced the code to use the unity one I see that crashes when fetching leaderboards. Authentication works fine but this happens when I try to fetch my leaderboards: Code: var leaderboards = await GKLeaderboard.LoadLeaderboards(GameCenter.LeaderBoards.Age.ToString()); Stack:  Default constructor not found for type Apple.Core.Runtime.NSMutableArrayString  StackTrace: at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00000] in <00000000000000000000000000000000>:0  at System.Activator.CreateInstance[T] () [0x00000] in <00000000000000000000000000000000>:0  at Apple.Core.Runtime.ReflectionUtility.CreateInstanceOrDefault[T] (System.IntPtr pointer) [0x00000] in <00000000000000000000000000000000>:0 at Apple.Core.Runtime.NSMutableArrayFactory.Init[TBase,TElement] () [0x00000] in <00000000000000000000000000000000>:0  at Apple.GameKit.Leaderboards.GKLeaderboard.LoadLeaderboards (System.String[] identifiers) [0x00000] in <00000000000000000000000000000000>:0  at UIGovHighscore+d__34.MoveNext () [0x00000] in <00000000000000000000000000000000>:0  at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0  at UIGovHighscore.ReadResidentRankV2New () [0x00000] in <00000000000000000000000000000000>:0
Replies
1
Boosts
0
Views
1.8k
Activity
Aug ’22
Apple Accessibility in 2020.3.32f1 and Testing in Editor
Hi folks, I'm excited that Apple has released these accessibility tools to use with Unity and I hopped on pretty quick to add them to my project. I've gotten them implemented in, but I have a few simple questions. In this video, the person running the tutorial uses 2020.3.32f1 to import all the Apple packages into the sample project, but in the Markdown files, it specifically mentions to use 2020.3.33f1. I was wondering if there is any issue to continue using 2020.32f1 with Apple Accessibility? For certain reasons, I am unable to update the project beyond that version for now. Second question I have, is there a way to test out the Apple Accessibility scripts and plugin within the editor? Is there a way to enable it for quick debugging? Or do I have to build to an iPhone to test the project's accessibility scripts? Thanks!
Replies
0
Boosts
0
Views
1.8k
Activity
Aug ’22