string filePath = "hfba_25";
TextAsset textAsset = Resources.Load(filePath) as TextAsset;
string fileString = textAsset.text;
我似乎无法弄清楚为什么资源不会加载不在编辑器中,也不会在Android设备上加载?该文件hfba_25
夹中Assets > Resources > hfba_25
Unity:Resources.Load无法正常工作
Edit_1:textAsset始终返回NULL
什么“不起作用”?你有任何错误信息?你在'fileString'变量中得到了什么? – Hellium
@Hellium没有我得到textAsset为空,没有其他错误信息 – randomjoe2
你检查你的文件格式是否被支持? https://docs.unity3d.com/Manual/class-TextAsset.html – OsmanSenol