Play()
Starts the camera.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AudioModule
public void Play()
Remarks
Call Application.RequestUserAuthorization before creating a WebCamTexture.
Examples
// Starts the default camera and assigns the texture to the current rendererusing UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour{ void Start() { WebCamTexture webcamTexture = new WebCamTexture(); Renderer renderer = GetComponent<Renderer>(); renderer.material.mainTexture = webcamTexture; webcamTexture.Play(); }}