# RemoveProvider(IAssetProvider)

> Removes a provider from the chain.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization.Providers](/engine/6000.7/script-reference/unity/localization/providers.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
public bool RemoveProvider(IAssetProvider provider)
```

### Parameters

**** (\[IAssetProvider]\(/engine/6000.7/script-reference/unity/localization/providers/iassetprovider)): The provider to remove.

### Returns

| Type                                                          | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the provider was present and removed; otherwise, `false`. |

### Remarks

When the removed provider was the [AssetProvider.Selected](/engine/6000.7/script-reference/unity/localization/providers/assetprovider/selected.md) one, the selection moves to the first remaining provider, or `null` when the chain becomes empty.

Remove a provider and confirm it is gone.

### Examples

```csharp
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
        }
    }
}
```
