Unity中Resources.LoadAssetAtPath JS和C#的不同写法

JS版本:

var prefab : GameObject = Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", GameObject);

C#版本:

GameObject prefab = (GameObject)Resources.LoadAssetAtPath("Assets/Artwork/mymodel.fbx", typeof(GameObject));

你可能感兴趣的:(resource)