C# Класс KUnityEditorTools.KEditorUtils

Shell / cmd / 等等常用Editor需要用到的工具集
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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路径,替换掉\字符

Приватные методы

Метод Описание
AddFileNamesToList ( string sourceDir, List allFiles ) : void
KEditorUtils ( ) : System
OnEditorUpdate ( ) : void

捕获Unity Editor update事件

Описание методов

CallMainThread() публичный статический Метод

异步线程回到主线程进行回调
public static CallMainThread ( System.Action action ) : void
action System.Action
Результат void

ClearConsoleLog() публичный статический Метод

清除Console log
public static ClearConsoleLog ( ) : void
Результат void

EachDirectoryFiles() публичный статический Метод

递归一个目录所有文件,callback
public static EachDirectoryFiles ( string dirPath, EachDirectoryDelegate eachCallback ) : void
dirPath string
eachCallback EachDirectoryDelegate
Результат void

ExecuteCommand() публичный статический Метод

执行批处理命令
public static ExecuteCommand ( string command, string workingDirectory = null ) : void
command string
workingDirectory string
Результат void

FindAllPublicTypes() публичный статический Метод

从所有的程序集收集指定类型,public, 包括继承的
public static FindAllPublicTypes ( Type findType ) : IList
findType System.Type
Результат IList

FindStrMatchesInFolderTexts() публичный статический Метод

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

GetCleanPath() публичный статический Метод

将丑陋的windows路径,替换掉\字符
public static GetCleanPath ( string path ) : string
path string
Результат string