Windows,C:\Users\<username>\AppData\Roaming\Unity\Asset Store Mac OS X,~/Library/Unity/Asset Store /Applications/Unity/Standard Packages/ /Users/Shared/Unity/Unity (Demo 路径) /Users/Shared/Unity/Unity /Users/Shared/Unity/Unity /Applications/Unity/St…
将某二进制文件放在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 f…
调用System.Windows.Forms DLL 首先在Unity新建Plugins文件夹添加System.Windows.Forms.dll 然后代码中添加引用 using System; using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.IO; public class FileMenu : Mono…
在移动端StreamingAssets下的文件是只读的,但大家可能跟我一样遇到了发布安卓以后放在StreamingAssets下的数据库文件一样读取不了, 但其实这个文件夹其实是可以读取到的,所以我们需要使用XML来读取文件,然后转存到persistentDataPath目录下,下面是代码: public static class Config { public static string filepath = Application.persistentDataPath + "/TowerDe…