Unity中Resources.LoadAssetAtPath JS和C#的不同写法
JS版本:
1 |
var prefab : GameObject = Resources.LoadAssetAtPath( "Assets/Artwork/mymodel.fbx" , GameObject); |
C#版本:
1 |
GameObject prefab = (GameObject)Resources.LoadAssetAtPath( "Assets/Artwork/mymodel.fbx" , typeof (GameObject)); |