Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

FileTableProvider.RemoveCollection

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public bool RemoveCollection(string guid);

Parameters

Parameter Description
guid The guid of the collection to remove.

Returns

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

Description

Removes a collection so this provider no longer serves its addresses.

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.

Additional resources: FileTableProvider.AddCollection, FileTableProvider.ClearCollections

<para>Stop serving a collection.</para>

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); } } }