Legacy Documentation: Version 5.1
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 function LoadMainAssetAtPath(assetPath: string): Object;

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.