using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Rensyu : MonoBehaviour
{
[SerializeField]
private int m_width = 1920;
[SerializeField]
private int m_height = 1080;
[SerializeField]
private RawImage m_displayUI = null;
private WebCamTexture m_webCamTexture = null; private IEnumerator Start(){ yield return null; if( WebCamTexture.devices.Length == 0 ) { Debug.LogFormat( "カメラのデバイスが無い様だ。撮影は諦めよう。" ); yield break; } yield return Application.RequestUserAuthorization( UserAuthorization.WebCam ); if (!Application.HasUserAuthorization (UserAuthorization.WebCam)) { Debug.LogFormat ("カメラを使うことが許可されていないようだ。市役所に届けでてくれ!"); yield break; } else { Debug.LogFormat ("惜しい!!!"); } // とりあえず最初に取得されたデバイスを使ってテクスチャを作りますよ。 WebCamDevice userCameraDevice = WebCamTexture.devices[ 0 ]; m_webCamTexture = new WebCamTexture( userCameraDevice.name, m_width, m_height ); Debug.LogFormat ("もう!!!"); // 撮影開始 m_displayUI = m_webCamTexture.Play(); Debug.LogFormat ("終了"); }
}
m_displayUI = m_webCamTexture.Play();
で型voidをUnityEngine.UI.Rawlmageに暗黙的に変換できません。とエラーが出てしまうんですけど、どのように直せばいいか教えてください、、、
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。