| assetPath | Pathname of the target asset. |
| type | Type filter for objects returned. |
Returns a resource at an asset path (Editor Only).
var prefab : GameObject; function Start () {
prefab = Resources.LoadAssetAtPath("AssetsArtworkmymodel.fbx", GameObject);
}
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour {
public GameObject prefab;
void Start() {
prefab = Resources.LoadAssetAtPath("AssetsArtworkmymodel.fbx", typeof(GameObject));
}
}
import UnityEngine
import System.Collections
public class Example(MonoBehaviour):
public prefab as GameObject
def Start() as void:
prefab = Resources.LoadAssetAtPath('AssetsArtworkmymodel.fbx', typeof(GameObject))
| assetPath | Pathname of the target asset. |
Returns a resource at an asset path (Editor Only).
var prefab : GameObject; function Start () {
prefab = Resources.LoadAssetAtPath.<GameObject>("AssetsArtworkmymodel.fbx");
}
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour {
public GameObject prefab;
void Start() {
prefab = Resources.LoadAssetAtPath<GameObject>("AssetsArtworkmymodel.fbx");
}
}
import UnityEngine
import System.Collections
public class Example(MonoBehaviour):
public prefab as GameObject
def Start() as void:
prefab = Resources.LoadAssetAtPath[of GameObject]('AssetsArtworkmymodel.fbx')