void Update()
        {
            if (this.networkStreamCameraInfo == null || this.networkStreamImage == null)
            {
                return;
            }

            this.elapsedTime += UnityEngine.Time.deltaTime;

            if (this.isPublishingCameraInfo || this.isPublishingImage || this.elapsedTime < this.sendingInterval * 0.001f)
            {
                return;
            }

            if (!HSRPubSynchronizer.CanExecute(this.publishSequenceNumber))
            {
                return;
            }

            this.isPublishingCameraInfo = true;
            this.isPublishingImage      = true;

            this.elapsedTime = 0.0f;

            StartCoroutine(this.PubImage());
        }
Beispiel #2
0
        void Update()
        {
            if (!this.leftCamera.IsConnected() || !this.rightCamera.IsConnected())
            {
                return;
            }

            this.elapsedTime += UnityEngine.Time.deltaTime;

            if (this.leftCamera.IsPublishing() || this.rightCamera.IsPublishing() || this.elapsedTime < this.sendingInterval * 0.001f)
            {
                return;
            }

            if (!HSRPubSynchronizer.CanExecute(this.publishSequenceNumber))
            {
                return;
            }

            this.elapsedTime = 0.0f;

            StartCoroutine(this.PubImage());
        }
Beispiel #3
0
        void Update()
        {
            if (this.tcpClient == null)
            {
                return;
            }

            this.elapsedTime += UnityEngine.Time.deltaTime;

            if (this.isPublishing || this.elapsedTime < this.sendingInterval * 0.001f)
            {
                return;
            }

            if (!HSRPubSynchronizer.CanExecute(this.publishSequenceNumber))
            {
                return;
            }

            this.isPublishing = true;
            this.elapsedTime  = 0.0f;

            StartCoroutine(this.PubTF());
        }