Resources.LoadAssetAtPath Manual     Reference     Scripting  
Scripting > Runtime Classes > Resources
Resources.LoadAssetAtPath

static function LoadAssetAtPath (assetPath : string, type : Type) : Object

Description

Returns a resource at an asset path (Editor Only).

This function always return null in the standalone player or web player. This is useful for quickly accesing an asset for use in the editor only.

var prefab : GameObject;

function Start () {
prefab = Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", GameObject);
}