/// <param name="providersList">Prioritized list of the source providers.</param> /// <param name="localizationManager">Localization manager instance.</param> /// <param name="sourcePrefix">Resource path prefix for the source providers.</param> /// <param name="fallbackToSource">Whether to fallback to the source versions of the resources when localized versions are not available.</param> public LocalizableResourceLoader(List <IResourceProvider> providersList, ILocalizationManager localizationManager, string sourcePrefix = null, bool fallbackToSource = true) : base(providersList, sourcePrefix) { LocalizationManager = localizationManager; SourceProviders = providersList.ToList(); SourcePrefix = sourcePrefix; FallbackToSource = fallbackToSource; LocalizationManager.AddChangeLocaleTask(InitializeProvisionSources); InitializeProvisionSources(); }
public UniTask InitializeServiceAsync() { localizationManager.AddChangeLocaleTask(ApplyManagedTextAsync); documentLoader = Configuration.Loader.CreateLocalizableFor <TextAsset>(providersManager, localizationManager); return(UniTask.CompletedTask); }