void Rebuild()
        {
            cachedFileContents = "";
            string assetPath = AssetDatabase.GetAssetPath(target);

            inkFile = InkLibrary.GetInkFileWithPath(assetPath);
            if (inkFile == null)
            {
                return;
            }

            if (inkFile.includes.Count > 0)
            {
                CreateIncludeList();
            }
            CreateErrorList();
            CreateWarningList();
            CreateTodoList();
            cachedFileContents = inkFile.GetFileContents();
        }
示例#2
0
        void Rebuild()
        {
            cachedTrimmedFileContents = "";
            string assetPath = AssetDatabase.GetAssetPath(target);

            inkFile = InkLibrary.GetInkFileWithPath(assetPath);
            if (inkFile == null)
            {
                return;
            }

            if (inkFile.includes.Count > 0)
            {
                CreateIncludeList();
            }
            else
            {
                includesFileList = null;
            }

            if (inkFile.masterInkAssets.Count > 0)
            {
                CreateMastersList();
            }
            else
            {
                mastersFileList = null;
            }

            CreateErrorList();
            CreateWarningList();
            CreateTodoList();
            cachedTrimmedFileContents = inkFile.GetFileContents();
            cachedTrimmedFileContents = cachedTrimmedFileContents.Substring(0, Mathf.Min(cachedTrimmedFileContents.Length, maxCharacters));
            if (cachedTrimmedFileContents.Length >= maxCharacters)
            {
                cachedTrimmedFileContents += "...\n\n<...etc...>";
            }
        }