Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddProvider(IAssetProvider)

Adds a provider to the end of the chain.
Read time 1 minuteLast updated 13 days ago

Definition

public void AddProvider(IAssetProvider provider)

Parameters

The provider to add.

Remarks

A
null
provider is ignored. Because providers are tried in order, an entry added last is consulted last.
Append a provider to a chain.

Examples

using Unity.Localization.Providers;using UnityEngine;namespace Unity.Localization.Samples{ public class AssetProviderAddProviderExample { public void Run() { var chain = new AssetProvider(); chain.AddProvider(new ResourceFolderProvider()); Debug.Log(chain.GetProvider<ResourceFolderProvider>() != null); // True } }}