예제 #1
0
        /// <summary>
        /// Configures <see cref="Devices"/> and <see cref="Textures"/> from <see cref="Ids"/>.
        /// </summary>
        public void Configure()
        {
            IsStarted    = false;
            IsConfigured = true;

            Devices.Clear();
            Textures.Clear();
            Textures2D.Clear();

            foreach (int webcamId in Ids)
            {
                var webcamDevice = WebCamTexture.devices[webcamId];
                Devices.Add(webcamDevice);
                Textures.Add(new WebCamTexture(webcamDevice.name));
            }
        }
예제 #2
0
        // Methods

        /// <summary>
        /// Configures <see cref="Devices"/> and <see cref="Textures"/> from <see cref="Ids"/>.
        /// </summary>
        public void Configure()
        {
            IsStarted    = false;
            IsConfigured = true;

            Devices.Clear();
            Textures.Clear();
            Textures2D.Clear();

            print("Configuring webcam...");
            foreach (var webcamId in Ids)
            {
                var webcamDevice = WebCamTexture.devices[webcamId];
                Devices.Add(webcamDevice);
                //Textures.Add(new WebCamTexture(webcamDevice.name));
                //HACK: pass in our webcam
                Textures.Add(CamFeed.Instance.GetWebCamTexture());
            }
        }