public async void OpenConfigScene() { IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); await sceneSystem.LoadContent("ConfigScene", LoadSceneMode.Single); await sceneSystem.UnloadContent("MainScene"); }
public void Load(string[] SceneNames) { IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); sceneSystem.LoadContent(SceneNames); return; }
private async void ServiceContentLoad(IMixedRealitySceneSystem sceneSystem, string sceneName) { if (requireActivationToken) { activationToken.AllowSceneActivation = false; } await sceneSystem.LoadContent(sceneName, loadSceneMode, activationToken); }
void Start() { sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); sceneSystem.LoadContent(sceneSystem.ContentSceneNames[0], LoadSceneMode.Single); UserNo = "0"; Invoke("Init", 1.0f); }
private async void Load() { IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); if (!sceneSystem.IsContentLoaded(StartSceneName)) { await sceneSystem.LoadContent(StartSceneName, LoadSceneMode.Single); } }
// loads desired scene public void Load(string SceneName) { IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); sceneSystem.LoadContent(SceneName); //MonoBehaviour shaderscript = Camera.main.GetComponent("screenspacedshader") as MonoBehaviour; //shaderscript.enabled = true; //System.Threading.Thread.Sleep(5000); //shaderscript.enabled = false; return; }
private async void AcceptInput(string ip, string azureId, string azureKey, string azureDomain) { #if WINDOWS_UWP if (String.IsNullOrEmpty(azureId) || String.IsNullOrEmpty(azureKey) || String.IsNullOrEmpty(azureDomain)) { //Load from document. string filename = "asa_account_config.json"; string path = Application.persistentDataPath; string filePath = Path.Combine(path, filename); if (!File.Exists(filePath)) { Toolkit.singleton.TriggerEvent("message_box_service", new MessageBoxContent(120, "Config file not found!", $"The path {filePath} does not lead to an existing file.\nYour input was:\nAure Id: {azureId}\nAure Key: {azureKey}\nAzure Domain: {azureDomain}", AcceptLastSubmittedInput, "Try again")); return; } string json = File.ReadAllText(filePath); try { AzureConfig config = JsonConvert.DeserializeObject <AzureConfig>(json); azureId = config.AccountId; azureKey = config.AccountKey; azureDomain = config.AccountDomain; if (!String.IsNullOrEmpty(config.AzureAnchorId)) { PlayerPrefs.SetString("current_asa_anchor_id", config.AzureAnchorId); } } catch (Exception ex) { Toolkit.singleton.TriggerEvent("message_box_service", new MessageBoxContent(6, "Deserialiation failed!", $"An error occurred", AcceptLastSubmittedInput, "Try again")); return; } } #endif PlayerPrefs.SetString("server_address", ip); PlayerPrefs.SetString("asa_account_id", azureId); PlayerPrefs.SetString("asa_account_key", azureKey); PlayerPrefs.SetString("asa_account_domain", azureDomain); PlayerPrefs.Save(); IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService <IMixedRealitySceneSystem>(); await sceneSystem.LoadContent("Demo2Scene", LoadSceneMode.Single); }
async void GoToScene(string name, LoadSceneMode loadType = LoadSceneMode.Single) { await sceneSystem.LoadContent(name, loadType); SceneManager.SetActiveScene(SceneManager.GetSceneByName(name)); }
public void LoadGame() { sceneSystem.LoadContent("GameScene", UnityEngine.SceneManagement.LoadSceneMode.Single); }