RemoveProvider(IAssetProvider)
Removes a provider from the chain.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.Localization.Providers
- Assembly: UnityEngine.LocalizationRuntimeModule
public bool RemoveProvider(IAssetProvider provider)
Parameters
The provider to remove.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
When the removed provider was the AssetProvider.Selected one, the selection moves to the first remaining provider, or when the chain becomes empty.
nullRemove a provider and confirm it is gone.
Examples
using Unity.Localization.Providers;using UnityEngine;namespace Unity.Localization.Samples{ public class AssetProviderRemoveProviderExample { public void Run() { var chain = new AssetProvider(); var resources = new ResourceFolderProvider(); chain.AddProvider(resources); Debug.Log(chain.RemoveProvider(resources)); // True Debug.Log(chain.GetProvider<ResourceFolderProvider>() == null); // True } }}