using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraV7 : MonoBehaviour
{
    public Material targetMaterial;

    void Start()
    {
        if (!targetMaterial)
        {
            Debug.LogError("No material assigned.");
            return;
        }

        WebCamTexture webcamTexture = new WebCamTexture();
        targetMaterial.mainTexture = webcamTexture;
        webcamTexture.Play();
    }
}
