예제 #1
0
        void Search(string filePath, Regex regex)
        {
            var code = File.ReadAllText(filePath);

            for (var match = regex.Match(code); match.Success; match = match.NextMatch())
            {
                // 仮想関数チェック
                // > 正規表現だけではうまく作れなかったのでこうする…
                if (!_containsVirtualMethod &&
                    (CheckAccessModifier(ref code, match.Index, "virtual") ||
                     CheckAccessModifier(ref code, match.Index, "override")))
                {
                    continue;
                }

                var info = new EmptyFunctionInfo(
                    filePath.Substring(Application.dataPath.Length - 6),
                    GetLineCount(ref code, match.Index),
                    GetFuncName(match.Value));

                _result.Add(info);
            }
        }
예제 #2
0
 static MonoScript GetScript(EmptyFunctionInfo info)
 {
     return(AssetDatabase.LoadAssetAtPath <MonoScript>(info.assetPath));
 }