Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RemoveCollection(string)

Removes a collection so this provider no longer serves its addresses.
Read time 1 minuteLast updated 12 days ago

Definition

public bool RemoveCollection(string guid)

Parameters

guid

The guid of the collection to remove.

Returns

Type

Description

bool
true
if a collection was removed; otherwise,
false
.

Remarks

Call this when a collection is deleted or moved to another provider. A record left behind keeps claiming the collection's name as an address prefix, so data files left in the output folder still resolve to it and a surviving collection whose name starts with the same text can be parsed against the stale prefix. An empty or null guid is treated as absent. This does not delete any generated file; regenerating prunes those.
Stop serving a collection.

Examples

using Unity.Localization.Providers.FileTables;namespace Unity.Localization.Samples{ public static class FileTableProviderRemoveCollectionExample { public static bool StopServing(JsonResourceProvider provider, string collectionGuid) { return provider.RemoveCollection(collectionGuid); } }}