ARSKView Breaking SpriteKit Scene Loading

Hi,


So after some code wrestling, I have an AR Spritekit Scene to add as a Mini-Game to a current game.


After finally getting the AR Scene to load in the original game, the main scenes stopped working when using this line as usual:


    // Load Scene
    [self.scene.view presentScene:OptionsScene transition:fade];


This occurs right after adding an ARSKView to the GameController in the Storyboard and linking it up.


I've also tried to explicitly establish a link to the original SKView and sending it a signal to show the original scenes but to no avail.


NSLog Outputfor ARSKView and SKView Pointers:


2018-06-29 01:57:11.252018-0600 ∞Rocket[5309:1743044] Norm Scene:<SKView: 0x105859600; frame = (0 0; 320 568); autoresize = W+H; layer = <SKMetalLayer: 0x1c023a8c0>>
2018-06-29 01:57:11.252293-0600 ∞Rocket[5309:1743044] AR Scene:<ARSKView: 0x105816800; frame = (0 0; 375 667); opaque = NO; layer = <SKMetalLayer: 0x1c0228cc0>>
2018-06-29 01:57:11.252370-0600 ∞Rocket[5309:1743044] Plain Pointer:<SKView: 0x105859600; frame = (0 0; 320 568); autoresize = W+H; layer = <SKMetalLayer: 0x1c023a8c0>> (self.view)


Thanks!

Accepted Reply

So after even more experimentation, my conclusion is that I'm either doing something wrong or ARSKView and SKView are bitter enemies.


Even adding ARSKView to an empty SKView causes the ARSKView to experience a resource choke. (Still functions)


At this point I've abandoned all efforts to make them work together, and I'm basically replacing my iOS target with a fresh ARKit target, because the old version of the game is better off just being the Watch version anyway.


So, not a solution, but definitely a conclusion.


Hope this helps!

Replies

Update:


After suspecting foul play, I decided to pause the ARKSView scene after noticing my CPU usage was too high after the moment where the scene is supposed to be dismissed.


Sure enough, pausing the scene stops the rendering for that scene and the other scenes load properly instead of behaving as if they were paused. (It chugs along until an ad loads and the scene comes back, then the app crashes)


(My guess is this is related to resources not being released by the ARScene coupled with some kind of limiting mechanism done by iOS)


Once I figure out how to dismiss it properly I'll post an update

So after even more experimentation, my conclusion is that I'm either doing something wrong or ARSKView and SKView are bitter enemies.


Even adding ARSKView to an empty SKView causes the ARSKView to experience a resource choke. (Still functions)


At this point I've abandoned all efforts to make them work together, and I'm basically replacing my iOS target with a fresh ARKit target, because the old version of the game is better off just being the Watch version anyway.


So, not a solution, but definitely a conclusion.


Hope this helps!