Exemplo n.º 1
0
        static void OpenWindow()
        {
            if (m_curWindow != null)
            {
                return;
            }
            //检查选中物品
            var path = AssetDatabase.GetAssetPath(Selection.activeInstanceID);

            if (path.IsNullOrEmpty())
            {
                XLog.PrintW("选中的路径为空");
                return;
            }
            //路径转为系统路径,判断是文件还是文件夹

            var path_sys = System.IO.Path.GetFullPath(path);

            mCurPath    = path;
            mCurPathSys = path_sys;
            if (System.IO.Directory.Exists(path_sys))
            {
                mIsDir = true;
            }
            else
            {
                mIsDir = false;
            }

            m_curWindow = EditorWindow.GetWindow <ChangeLuaFileExtName>();
        }
Exemplo n.º 2
0
 private void OnDestroy()
 {
     m_curWindow = null;
 }