Resources.Loadstatic function Load (path : String) : ObjectDescriptionLoads an asset stored at path in a Resources folder. Returns the asset at path if it can be found otherwise returns null. The path is relative to any Resources folder inside the Assets folder of your project, extensions must be omitted.
JavaScript
// Assigns a texture named "Assets/Resources/glass" to a Plane. using UnityEngine; import UnityEngine Another example:
JavaScript
// Instantiates a prefab at the path "Assets/Resources/enemy". using UnityEngine; import UnityEngine static function Load (path : String, type : Type) : ObjectDescriptionLoads an asset stored at path in a Resources folder. Returns the asset at path if it can be found otherwise returns null. Only objects of type will be returned. The path is relative to any Resources folder inside the Assets folder of your project, extensions must be omitted.
JavaScript
// Assigns a texture named "glass" to a Plane. using UnityEngine; import UnityEngine
JavaScript
// Instantiates a prefab named "enemy" located in any Resources using UnityEngine; import UnityEngine |
