static void SaveEditorSettings() { TBEditorHelper.CheckoutAndSaveJSONFile("TButtEditorServices.json", selectedServices, TBDataManager.PathType.ProjectFolder, true); if (selectedServices.oculus) { TBEditorServiceDefines.SetTButtService(VRService.Oculus); } else if (selectedServices.steam) { TBEditorServiceDefines.SetTButtService(VRService.Steam); } else if (selectedServices.psn) { TBEditorServiceDefines.SetTButtService(VRService.PSN); } else if (selectedServices.xbox) { TBEditorServiceDefines.SetTButtService(VRService.XboxLive); } else { TBEditorServiceDefines.SetTButtService(VRService.None); } }
void ShowSDKSection(string sdk, ref bool enabled) { selectedServiceName = _serviceSettings[sdk].GetName(); if (!_serviceSettings[sdk].HasSDK()) { _serviceSettings[sdk].ShowSDKNotFoundMessage(); _serviceSettings[sdk].ShowSDKDownloadButton(); } else { bool isEnabled = enabled; _serviceSettings[sdk].ShowSDKToggleButton(ref enabled); _serviceSettings[sdk].ShowSettings(); if (isEnabled != enabled) { if (!enabled) { selectedServices = new TBEditorServiceDefines.Services(); } else { selectedServices = TBEditorServiceDefines.GetServicesStruct(_serviceSettings[sdk].GetService()); } } } }