Exemplo n.º 1
0
    // Start is called before the first frame update

    private void Awake()
    {
        DontDestroyOnLoad(gameObject);
        if (Control == null)
        {
            Control = this;
        }
    }
Exemplo n.º 2
0
    //  this for initialization
    void Start()
    {
        if (WebCamTexture.devices.Length == 0)
        {
            debugText.text = "no camera";
        }
        WebCamDevice[] devices = WebCamTexture.devices;
        webcam = new WebCamTexture(devices[0].name, 896, 504, 3);

        // quadRenderer = quad.GetComponent<Renderer>() as Renderer;
        // displayImage.texture = webcam;
        webcam.Play();
        imageUploader = this.GetComponent <SendTexture>();
        StartCoroutine(GetKeywords());
        StartCoroutine(GetCaptionWithKeywords());
    }