Пример #1
0
 public void Initialize(WebCamTexture webCamTexture, ITextureStreamingClient textureStreamingClient, float intervalTimeMillisec = 100)
 {
     _webCamTexture          = webCamTexture;
     _textureStreamingCLient = textureStreamingClient;
     _intervalTimeMillisec   = intervalTimeMillisec;
     _texture2D   = new Texture2D(_webCamTexture.width, _webCamTexture.height);
     _initialized = true;
 }
Пример #2
0
        public void Initialize(WebCamTexture webCamTexture, ITextureStreamingClient textureStreamingClient, float intervalTimeMillisec = 100)
        {
            _webCamTexture          = webCamTexture;
            _textureStreamingCLient = textureStreamingClient;
            _intervalTimeMillisec   = intervalTimeMillisec;
            _texture2D = new Texture2D(_webCamTexture.width, _webCamTexture.height);

            _Width          = _webCamTexture.width;
            _Height         = _webCamTexture.height;
            _Encoder        = new VP8Encoder(_Width, _Height);
            _VP8EncodedData = new byte[4 * _Width * _Height];

            _initialized = true;
        }
        void Start()
        {
            _textureSteamingClient = _textureSteamingClientObject.GetComponent <ITextureStreamingClient>();

            _skyboxMaterial = RenderSettings.skybox;

            SetupDropdown();

            _nodeSelectionDropdown.onValueChanged.AddListener(OnDropdownValueChanged);

            _startStreaming.onClick.AddListener(OnClickStartStreaming);
            _stopStreaming.onClick.AddListener(OnClickStopStreaming);
            _connect.onClick.AddListener(OnClickConnect);
            _disconnect.onClick.AddListener(OnClickDisconnect);
        }