Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Remove(string)

Removes any entry registered under the given address.
Read time 1 minuteLast updated 13 days ago

Definition

public bool Remove(string address)

Parameters

address

The address to clear.

Returns

Type

Description

bool
true
if an entry was removed; otherwise,
false
.

Remarks

An empty or null
address
is treated as absent and returns
false
.
Remove a registered asset and confirm it is gone.

Examples

using Unity.Localization.Providers;using UnityEngine;namespace Unity.Localization.Samples{ public class ReferencedAssetProviderRemoveExample { public void Run() { var provider = new ReferencedAssetProvider(); provider.Add("UI/Logo", new Texture2D(2, 2)); Debug.Log(provider.Remove("UI/Logo")); // True Debug.Log(provider.Contains("UI/Logo")); // False } }}