WebCamTexture.isPlaying

Unity · Версия 2020.3 LTS · Scripting · WebCamTexture

WebCamTexture.isPlaying

public bool isPlaying;

Описание

Возвращается, если камера в данный момент воспроизводит.

using UnityEngine;

public class Example : MonoBehaviour
{
    // Пытается запустить камеру и выводит в консоль, успешно это или нет.
    void Start()
    {
        WebCamTexture webcamTexture = new WebCamTexture();
        webcamTexture.Play();
        Debug.Log(webcamTexture.isPlaying);
    }
}

Обновлено 17 ноября 2026 г.