Set unity build graphics settings to open gl es 2 only but these errors still show:
Undefined symbols for architecture arm64:
"_MTLCreateSystemDefaultDevice", referenced from:
-[UnityARSession setupMetal] in ARSessionNative.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have not yet test with OpenGL ES 3. If OpenGL ES 3 is backward compatible to OpenGL ES 2, then it's just a matter of changing the macro.
The error you posted occured because Metal.Framework is not added to xcode project, this can be fixed by modifying the post build script.
Will be testing now. Please address the issues below and we will work towards merging it in. Thanks again
I just tested with an iPhone7, rendering api opengles2 and i get a crash in GlesHelper.mm line 355. This is with unity 5.6.2p2
I will try with 2017.1.0f3
Edit: Same crash.
I have re-produce this issue. This happens only when I connect my iphone with to my computer. If I unplug the iphone and open the app, it works fine.
Browsing the code indicate this seems related to the Unity Remote feature. I'm not familiar with Unity Remote Implementation, here is my guess:
New Unity Remote feature tried to send texture back to computer whenever a connection is present. It tried to use GL_RENDERBUFFER handle, but this handle is not initialized.
Please try the latest commit.
Interesting, I’ll take a look at the unity side of things.
Hi Christopher, any clue on how to fix it? Or do we know a workaround for now?
Seems this only happens on iOS beta 4 version. Not sure why, but hope this info helps.
do you test this change on the real devices? because I got pool performance on my iPad Pro with iOS 11 beta 6
Yes, but not on iOS beta 6. Last time we test it was on iOS beta 5 and still works smoothly. What kind of performance measurement are you talking about? Low FPS?
I tried today with the latest beta, after making the changes in the pull request you linked. It appears to work in two orientations portrait and landscape one way, but if I flip the device 180 degrees, the upside down portrait mode and other landscape mode have black screens for the AR camera but retain tracking and Unity generated graphics.
Indeed, this might happen. I don't really understand how to rotate OpenGL image after getting the texture from ARKit, so basically I tried different combination and find one that actually works. If people have more knowledge in OpenGL, please educate me.
I update Xcode 9 GM seed and iOS 11 GM seed(iphone6s) today. If I chose OpenGL ES 2 only, the camema view is green, seems like not support OpenGL ES 2 again. My Unity version is 5.6.2f1, arkit-plugin is f2a4021 updated today.
I think I find out the files I download from "default" are different with these files......I haven't understand bitbucket
Yeah... this is just a pull request, so you will need to clone the repo from my namespace.
Unfortunately I've experienced some bad behaviour with this patch.
The worst is that the screen goes almost black sometimes (You can see some dark color variations though. just the video background, not the 3D content itself). I tried to narrow it down, but couldn't find the cause.
When it appears, the device orientation seems to be factor (Point neutraly forward: works; point too much upwards/downwards/to the side: screen goes black). Reseting the tracking helps sometimes.
I assume it has to do with asynchronous nature of ARKit vs. Unity's run loop. ARKit seems to create 10 different buffers for texture pairs (Y and UV) and switch through them. Maybe, whenever the screen goes black, an invalid texture pair is shown.
The other problem was mentioned before (PortraitUpsideDown and LandscapeLeft (by Unity definition) don't work). I may provide a patch for this as I could solve it.
Find fixed orientation (PortraitUpsideDown and LandscapeLeft) here:
I test your repo with unity 2018.4.2f1 and xcode 10.2.1. It seems not working anymore. It works well with metal, but when I switch the rendering api to opengles, I only see the red background.
Ina Yosun Chang
It looks like this fix no longer works for the latest +face tracking arkit...
Ina Yosun Chang
Using your modification in the newest arkit sdk with unity 2018.4.2f1 and xcode 10.2.1, seems not working anymore. At the same time, this repo also doesn’t work in unity 2018.4.2f1 and xcode 10.2.1, there are a lot of errors, it seems api changed?
Does anyone have method which can work with ARKit and opengl es?