I am tinkering with the sample project "SpatialAudio" from [Google VR SDK for Unity][1], to implement it in iOS. I built it in Unity using the latest GVR SDK, so I had to replace a few deprecated keywords (GvrAudioSource instead of CardboardAudioSource, etc.) If I build it in Xcode just as Unity gives it to me, it runs fine in the physical device. Then, I tried to edit the Unity-generated file 'main.mm' to change the default App Controller (UnityAppController) to a new one, let's call it NewAppController.
// main.mm
...
const char* AppControllerClassName = "UnityAppController";
...
//UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]); // old
UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:"NewAppController"]); // new
NewAppController is a class which inherits from UnityAppController and does not override any of its methods or properties, like this:
@interface NewAppController : UnityAppController
@end
@implementation NewAppController
@end
I thought that it should work exactly the same as before, but now I get the following warning in runtime: "Audio effect GVR Audio Renderer could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly."
Everything else works just fine: I can see the video and even hear the sounds, but only they are not 'spatialized'.
I am using: GVR SDK 1.1, Unity 5.5.0f3, iOS 10.1.1
[1]: https://github.com/googlevr/gvr-unity-sdk/tree/master/Samples
↧