Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

AssetDatabase.IsMainAssetAtPathLoaded

public static bool IsMainAssetAtPathLoaded(string assetPath);

Parameters

assetPathFilesystem path of the asset to load.

Description

Returns true if the main asset object at assetPath is loaded in memory.

All paths are relative to the Project folder, for example: "Assets/MyTextures/hello.png".

See Also: AssetDatabase.LoadMainAssetAtPath, Resources.UnloadAsset.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答