unity
读取Mesh信息
//根据Object物体返回资源的预览 纹理 返回值为2D图片
//返回值:Texture2D
AssetPreview.GetAssetPreview(Object go);
文档读取
//text读取
//path文档地址
string pth = "Assets/Resources/MyText";
if(!File.Exists(pth))
{//如果文档不存在创建文档,并写入 1111
File.Create(pth).Dispose();
StreamWriter sw = new StreamWriter(pth);
sw.Write("1111");
sw.Flush();//表示当前的先写入文档,不等后面的
sw.Close();
AssetDatabase.SaveAssets();//修改立即写入磁盘 ,序列化期间不能是使用
AssetDatabase.Refresh();//刷新有修改的资源
}
TextAsset tx = (TextAsset) Resources.Load ("MyText");
string info = tx.text;
string[] splinfo = info.Split(':');
String
string.Compare();//对两个字符串序列化比较