Quantcast
Channel: Questions in topic: "loadassetatpath"
Viewing all articles
Browse latest Browse all 62

LoadAssetAtPath

$
0
0
I cant get this to work right for some reason. I have tried Resources and AssetDatabase to run this from but keep getting a null object from it. This is in editor and not runtime. importPath shows up correctly but impObject returns a null object. Any ideas? var prefabPath : String = assetPath.Replace(".fbx", "Prefab.prefab"); var importPath : String = assetPath; Debug.Log(importPath); var impObject : GameObject = Resources.LoadAssetAtPath(importPath, GameObject) as GameObject; Debug.Log(impObject);

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>