文档

Unity Engine

Unity Engine

ReleaseAllAssets()

Releases every cached asset across all locales.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public void ReleaseAllAssets()

Remarks

Frees all localized assets held by the database's cache. Each asset is reloaded through the provider chain the next time it is requested. To release only one locale's assets, use ResourceDatabase.ReleaseAssets.
Releases all cached assets, for example before unloading a scene.

Examples

using Unity.Localization;namespace Unity.Localization.Samples{ public class ReleaseAllAssetsExample { public void Run() { LocalizationSettings.ResourceDatabase.ReleaseAllAssets(); } }}