Add reload speech command
This commit is contained in:
parent
b4c406f0ed
commit
bccf6777ad
Assets
MixedRealityToolkit.Generated/CustomProfiles
Scripts
|
@ -23,3 +23,10 @@ MonoBehaviour:
|
|||
id: 0
|
||||
description: None
|
||||
axisConstraint: 0
|
||||
- localizationKey:
|
||||
keyword: Reload
|
||||
keyCode: 0
|
||||
action:
|
||||
id: 0
|
||||
description: None
|
||||
axisConstraint: 0
|
||||
|
|
|
@ -4,14 +4,12 @@ using UnityEngine.Networking;
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
// using TMPro;
|
||||
using Microsoft.MixedReality.WebView;
|
||||
|
||||
public class EndpointLoader : MonoBehaviour
|
||||
{
|
||||
public WebView webView1;
|
||||
public WebView webView2;
|
||||
// public Button ReloadButton;
|
||||
|
||||
private const string apiUrl = "http://windows.local:5000/api/endpoints";
|
||||
private const string defaultEndpoint1 = "http://windows.local:8100/mystream/";
|
||||
|
@ -19,7 +17,6 @@ public class EndpointLoader : MonoBehaviour
|
|||
|
||||
private void Start()
|
||||
{
|
||||
// ReloadButton.onClick.AddListener(() => StartCoroutine(LoadEndpoints()));
|
||||
StartCoroutine(LoadEndpoints());
|
||||
}
|
||||
|
||||
|
@ -48,7 +45,6 @@ public class EndpointLoader : MonoBehaviour
|
|||
{
|
||||
Debug.LogError("Parsed endpoints are empty. Using default endpoints");
|
||||
UseDefaultEndpoints();
|
||||
// yield return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -57,6 +53,11 @@ public class EndpointLoader : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public void ReloadEndpoints()
|
||||
{
|
||||
StartCoroutine(LoadEndpoints());
|
||||
}
|
||||
|
||||
private void UseDefaultEndpoints()
|
||||
{
|
||||
webView1.Load(defaultEndpoint1);
|
||||
|
|
Loading…
Reference in New Issue