public void UnloadAllScripts() { scriptLoader.UnloadAll(); #if UNITY_GOOGLE_DRIVE_AVAILABLE // Delete cached scripts when using Google Drive resource provider. if (providersManager.IsProviderInitialized(ResourceProviderType.GoogleDrive)) { (providersManager.GetProvider(ResourceProviderType.GoogleDrive) as UnityCommon.GoogleDriveResourceProvider).PurgeCachedResources(config.Loader.PathPrefix); } #endif if (IsNavigatorAvailable) { navigatorUI.DestroyScriptButtons(); } }
public async Task ApplyManagedTextAsync() { records.Clear(); documentLoader.UnloadAll(); var documents = await documentLoader.LoadAllAsync(); foreach (var document in documents) { var managedTextSet = ManagedTextUtils.GetManagedTextFromScript(document); foreach (var text in managedTextSet) { records.Add(new ManagedTextRecord(text.FieldId, text.FieldValue, text.Category)); } ManagedTextUtils.SetManagedTextValues(managedTextSet); } }
public void DestroyService() { localizationManager?.RemoveChangeLocaleTask(ApplyManagedTextAsync); documentLoader?.UnloadAll(); }