| Parameter | Description |
|---|---|
| index | The position to insert at. |
| provider | The provider to insert. |
Inserts a provider at the given position in the chain.
A null provider is ignored. Inserting at index 0 makes the provider the first one tried, which
lets it take priority over the existing entries.
<para>Insert a provider at the front so it is tried first.</para>
using Unity.Localization.Providers; using UnityEngine;
namespace Unity.Localization.Samples { public class AssetProviderInsertProviderExample { public void Run() { var chain = new AssetProvider(); chain.AddProvider(new ResourceFolderProvider()); chain.InsertProvider(0, new ReferencedAssetProvider()); // tried first
Debug.Log(chain.Providers[0] is ReferencedAssetProvider); // True } } }