摘要:以下所有信息基于Windows 10 环境下: Debug.Log(System.IO.Directory.GetCurrentDirectory()); // 输出:E:\kingBook\projects\unity_swfParse ,注意此方法可能通过 Directory.SetCurren
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System.IO; using System.Xml; using UnityEditor
阅读全文
摘要:string path="Assets";//Assets/Scenes if(Directory.Exists(path)){ DirectoryInfo directoryInfo=new DirectoryInfo(folderPath); FileInfo[] fileInfos=direc
阅读全文
摘要:ArgumentException: 'UTF_8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.Reg
阅读全文
摘要:位置:unity文档->Manual->Scripting->Scripting Overview->Platform dependent compilation Property:Function: UNITY_EDITOR #define directive for calling Unity
阅读全文
摘要:扩展编辑器顶部的菜单栏 [MenuItem("test/item1 %g"] public static void haha() { Debug.Log("this is a test"); } // 添加带快捷键的菜单:只需要在后边添加%+key。 //(win : Ctrl+key, Mac :
阅读全文
摘要:RequireComponent的使用: 当你添加的一个用了RequireComponent组件的脚本,需要的组件将会自动被添加到game object(游戏物体)。这个可以有效的避免组装错误。举个例子一个脚本可能需要刚体总是被添加在相同的game object(游戏物体)上。用RequireCom
阅读全文
摘要:using UnityEngine; using System.Collections; public class Test : MonoBehaviour { public int width { get { Debug.Log("get"); return _width; } ...
阅读全文