Version: 2023.2
public bool isPlaying ;

描述

返回摄像机当前是否正在运行。

using UnityEngine;

public class Example : MonoBehaviour { // Tries to start the camera and outputs to the console if is was sucessful or not. void Start() { WebCamTexture webcamTexture = new WebCamTexture(); webcamTexture.Play(); Debug.Log(webcamTexture.isPlaying); } }