ios - Cannot use camera on iPhone when run with Unity -


i running simple script access camera. works webcam on laptop gives me white screen when run on iphone

public class cameracontroller : monobehaviour {      public webcamtexture mcamera = null;     public gameobject plane;      // use initialization     void start ()     {         application.requestuserauthorization(userauthorization.webcam);         debug.log ("script has been started");         plane = gameobject.findwithtag ("player");          mcamera = new webcamtexture ();         plane.getcomponent<renderer>().material.maintexture = mcamera;         mcamera.play ();      }      // update called once per frame     void update () {     } } 

when build , run, unity fires xcode, update info.plist asks permission access camera

<key>nscamerausagedescription</key> <string>$(product_name) camera use</string> 

try solution (this help):

http://answers.unity3d.com/questions/706142/openstart-device-camera-in-unity3d-app-using-c-scr.html


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -