private void DestroyAllManagers() { //If the Mixed Reality Manager is not configured, stop. if (activeProfile == null) { return; } // Destroy all active managers in the registry foreach (var manager in activeProfile.ActiveManagers) { manager.Value.Destroy(); } activeProfile.ActiveManagers.Clear(); // Destroy all registered runtime components foreach (var manager in MixedRealityComponents) { manager.Item2.Destroy(); } MixedRealityComponents.Clear(); }
private void DestroyAllServices() { //If the Mixed Reality Toolkit is not configured, stop. if (activeProfile == null) { return; } // Destroy all active services in the registry foreach (var service in activeProfile.ActiveServices) { service.Value.Destroy(); } activeProfile.ActiveServices.Clear(); // Destroy all registered runtime components foreach (var component in MixedRealityComponents) { component.Item2.Destroy(); } MixedRealityComponents.Clear(); }