rsanchezsaez / CardboardSDK-iOS

iOS port of Google's CardboardSDK (mobile VR toolkit)
Other
334 stars 104 forks source link

Integration to current working Unity 4.6 android project #4

Closed nosmirck closed 9 years ago

nosmirck commented 9 years ago

Hi! I have not very clear how to replace/upgrade/change my current working android project.

First, of all (before getting to your git), when I compiled the unity project to ios build, it did it successfully, then, on Xcode, I tried to compile the file, but... It failed with:

Undefined symbols for architecture armv7:
  "_InitFromUnity", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Searching on goole, I landed on your git, I first tried option b (just added the Cardboard-SDK folder on Classes folder as the instructions say) and it had compiler errors, I fixed one by one... until I got again the same "_InitFromUnity" error...

So, Can you please Explain how do I build for iOS?

I'm using Unity 4.6.3 and Cardboard Unity Plugin 0.4.9

Thanks!

rsanchezsaez commented 9 years ago

Hi,

I'm afraid this won't work with Unity 4.6.3, the instructions and code are specific to Unity 5.

Can you upgrade to Unity 5?

Cheers.

rsanchezsaez commented 9 years ago

I'm closing the issue because I don't plan to support Unity 4.6.3. Please see if you can update.

nosmirck commented 9 years ago

Hey Ricardo, thanks for the answer, but still I think you could help me a bit.

I made it work! I managed to compile and run successfully the app on a iPhone 5 iOS 7.1.

What I did:

But it is only rendering full screen one single camera (the middle camera I guess) I don't know what could be happening, but I suspect some stuff.

First, after I add the CardboardSDK folder into Classes folder inside xCode just like in the instructions, I find some errors (maybe related to the project being Unity 4.6). Two errors are corrected automatically (just using "fix" on xcode, both are casting related) the other 2 errors are a little tricky, one is related to the OpenGL version (the api can't be integer value) so I force the code to be GLES 2.0. The other error is with a function called ConvertToUnityScreenOrientation, it is not even related to your plugin, but I force it to set it landscape left.

I can't switch the project to Unity 5 because I'm using a mobile movie texture plugin that is not compatible with Unity 5. If could help me with this, I'll really appreciate.

Thanks!

Luis.

rsanchezsaez commented 9 years ago

Hey Luis,

I'm really sorry but these days I don't have much time to look into this. On first glance I wouldn't know what's the problem you're having. :-/

Best of lucks, Ricardo