將某二進制文件放在Resources目錄下,希望用Resources.Load<TextAsset>的方式讀取,發現TextAsset是null
查閱Unity文檔得知,使用Resources.Load讀二進制文件,則文件擴展名必須為bytes
另外注意,Resources.Load的路徑不要包含擴展名
Please notice that files with the .txt and .bytes extension will be treated as text and binary files, respectively. Do not attempt to store a binary file using the .txt extension, as this will create unexpected behaviour when attempting to read data from it.
https://docs.unity3d.com/Manual/class-TextAsset.html
