Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorUtility.UnloadUnusedAssets

static function UnloadUnusedAssets(): void;
static void UnloadUnusedAssets();
static def UnloadUnusedAssets() as void

Description

Unloads assets that are not used.

An asset is deemed to be unused if it isn't reached after walking the whole game object hierarchy, including script components. Static variables are also examined.

See Also: Resources.UnloadUnusedAssets.