// Use this for initialization void Start() { //_SavePath = Application.persistentDataPath +"/WhoaDude/"; _SavePath = Application.persistentDataPath + "/"; sw = new System.Diagnostics.Stopwatch(); cameraTargets = GameObject.FindGameObjectsWithTag("CameraTarget"); #if UNITY_WEBPLAYER Application.RequestUserAuthorization(UserAuthorization.WebCam | UserAuthorization.Microphone); if (Application.HasUserAuthorization(UserAuthorization.WebCam | UserAuthorization.Microphone)) { startWebcam(); } else { //we don't have permission Debug.Log("We don't have permission"); return; // devices = WebCamTexture.devices; // deviceName = devices[0].name; // wct = new WebCamTexture(deviceName, 640, 360, 15); // renderer.material.mainTexture = wct; // wct.Play(); // resultString = "no problems"; // } else { // resultString = "no permission!"; } #endif #if UNITY_ANDROID androidPhotoGalleryHelperClass = new AndroidPhotoGalleryHelperClass(); if (_SavePath.ToLower().Contains("/sdcard/")) { _SavePath = _SavePath.Substring(0, _SavePath.ToLower().IndexOf("/sdcard/")); _SavePath = _SavePath + "/sdcard/WhoaDude/"; } startWebcam(); #endif }
void OnApplicationQuit() { _instance = null; }
// Use this for initialization void Start() { androidPhotoGalleryHelperClass = AndroidPhotoGalleryHelperClass.Instance; }