Unity:从Mac上的Resource文件夹加载资产文件

时间:2018-07-01 13:37:07

标签: c# unity3d scriptable

我无法从Mac上的Unity中的Resource文件夹加载资产。 我尝试过这两种方式,但是总是说建筑是空的,这里没有什么帮助?

Building building = AssetDatabase.LoadAssetAtPath("Assets/Resources/BuildingsData/" + category + "/" + name + ".asset", typeof(Building)) as Building;

Building building = Resources.Load("BuildingsData/" + category + "/" + name, typeof(Building)) as Building;

0 个答案:

没有答案