/**
         * Terminates the current remote display session (if any) and stops discovery on the native
         * extension.
         */
        private void Deactivate()
        {
            Debug.Log("Deactivating Cast Remote Display.");
            StopRemoteDisplaySession();

            if (castRemoteDisplayExtension != null)
            {
                castRemoteDisplayExtension.Deactivate();
            }
            castRemoteDisplayExtension = null;
            StopAllCoroutines();
            castDevices.Clear();
        }
Пример #2
0
        /**
         * Terminates the current remote display session (if any) and stops discovery on the native
         * extension.
         */
        private void Deactivate()
        {
            Debug.Log("Deactivating Cast Remote Display.");
            connectedCastDevice = null;
            isCasting           = false;
            StopRemoteDisplaySession();
            DiscardGeneratedTextureIfNeeded();

            if (castRemoteDisplayExtension != null)
            {
                castRemoteDisplayExtension.Deactivate();
            }
            castRemoteDisplayExtension = null;
            StopAllCoroutines();
            castDevices.Clear();
        }