Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

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

AssetDatabase.LoadMainAssetAtPath

Switch to Manual
public static Object LoadMainAssetAtPath(string assetPath);

Parameters

assetPath Filesystem path of the asset to load.

Description

Returns the main asset object at assetPath.

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

See Also: AssetDatabase.LoadAssetAtPath, AssetDatabase.LoadAllAssetsAtPath.