How to take a photo in iPhone and use it as the texture of a plane?
Or how to make a video stream from iPhone and show it in Unity?
I am new to Unity and please help me
Thank you in advance
(I am not a native English speaker and please forgive any unclarity in my question)
I do not think that Apple supports the video streaming part. That would be very battery intensive (you’d be recording video, running the unity app you’ve made, and rendering the video into the game).
For the taking a photo from an iDevice and having it be a texture, do you mean taking a photo and having it go straight to the game?
As of right now, i don’t think you can take a photo from an iDevice (iphone, ipad, ipod touch) and have it go straight to the game.
You could take a picture, upload it to your computer, and do that in unity.
I don’t think you can directly… But similar, pulling a texture from the WebCamTexture: Mobile camera, take picture and map image to uv coordinates on a model at runtime. - Questions & Answers - Unity Discussions
But NOTE: its definitely not the same as taking a photo with the device camera, different resolution and dimensions… Some claim that prime31 plugin lets you, but I haven’t tried it personally: https://forum.unity3d.com/threads/iphone-ipad-take-a-pic-and-display-on-a-plane.117053/
Good luck. I have gotten the WebCamTexture version working, but then you have to manually rotate the image unless you are doing something with horizontal only.