C# Class KUnityEditorTools.KEditorUtils

Shell / cmd / 等等常用Editor需要用到的工具集
Exibir arquivo Open project: mr-kelly/KEngine Class Usage Examples

Public Methods

Method Description
CallMainThread ( System.Action action ) : void

异步线程回到主线程进行回调

ClearConsoleLog ( ) : void

清除Console log

EachDirectoryFiles ( string dirPath, EachDirectoryDelegate eachCallback ) : void

递归一个目录所有文件,callback

ExecuteCommand ( string command, string workingDirectory = null ) : void

执行批处理命令

FindAllPublicTypes ( Type findType ) : IList

从所有的程序集收集指定类型,public, 包括继承的

FindStrMatchesInFolderTexts ( string sourceFolder, Regex searchWord, bool>.Func fileFilter = null ) : List>.Dictionary

在指定目录中搜寻字符串并返回匹配}

GetCleanPath ( string path ) : string

将丑陋的windows路径,替换掉\字符

Private Methods

Method Description
AddFileNamesToList ( string sourceDir, List allFiles ) : void
KEditorUtils ( ) : System
OnEditorUpdate ( ) : void

捕获Unity Editor update事件

Method Details

CallMainThread() public static method

异步线程回到主线程进行回调
public static CallMainThread ( System.Action action ) : void
action System.Action
return void

ClearConsoleLog() public static method

清除Console log
public static ClearConsoleLog ( ) : void
return void

EachDirectoryFiles() public static method

递归一个目录所有文件,callback
public static EachDirectoryFiles ( string dirPath, EachDirectoryDelegate eachCallback ) : void
dirPath string
eachCallback EachDirectoryDelegate
return void

ExecuteCommand() public static method

执行批处理命令
public static ExecuteCommand ( string command, string workingDirectory = null ) : void
command string
workingDirectory string
return void

FindAllPublicTypes() public static method

从所有的程序集收集指定类型,public, 包括继承的
public static FindAllPublicTypes ( Type findType ) : IList
findType System.Type
return IList

FindStrMatchesInFolderTexts() public static method

在指定目录中搜寻字符串并返回匹配}
public static FindStrMatchesInFolderTexts ( string sourceFolder, Regex searchWord, bool>.Func fileFilter = null ) : List>.Dictionary
sourceFolder string
searchWord System.Text.RegularExpressions.Regex
fileFilter bool>.Func
return List>.Dictionary

GetCleanPath() public static method

将丑陋的windows路径,替换掉\字符
public static GetCleanPath ( string path ) : string
path string
return string