Releasing PrefabDocumenter

 

 

Hello exiii community! My name is Yuya, Software Engineer at exiii.

In this blog post, I will introduce a Unity Editor Extension called PrefabDocumenter, which I built so that I can easily add documents to Unity Assets.

 

 

Overview

PrefabDocumenter adds documents to corresponding Assets with meta files generated by Unity.

There are 3 types of PrefabDocumenters, and each has different functions.

 

 

PrefabDocumenter

 

  • This is PrefabDocumenter.
  • PrefabDocumenter itself does not need Unity, but the targeted Assets need meta files generated by Unity.
  • It reads meta files, exports file structure records, template file drafts, and database.

 

 

PrefabDocumenterPage

PrefabDocumenterPage 

  • This is a page, which reads and displays database exported from PrefabDocumenter.
  • netfly hosts by following master branch.

 

uPrefabDocumenterViewer

uPrefabDocumenterViewer

  • This is a Unity Editor Extension.
  • It can read, display, and write on a draft file exported from PrefabDocumenter.

 

How to use

  1. Download the latest PrefabDocumenter from the GitHub release page.
  2. Create database following the procedures written in PrefabDocumenter README.md
  3. You can read and display database by PrefabDocumenterPage
  4. Also by letting uPrefabDocumenterViewer load draft, you can edit.

 

File structure of exported data

  • MetaFileTree
    • <MetaFiles> : A parent of MetaFile
    •  SelectFolderPath : An absolute path of the designated folder
      • <MetaFile> : A meta file
      • Name : A file name corresponding to a meta file
      • Path : A path to the meta file
      • Guid : Guid generated by Unity
      • Type : File or Folder. Not built.
  • Draft
    • <MetaFiles> : A parent of MetaFile
      • <MetaFile> : A meta file
      • Name : A file name corresponding to a meta file
      • Guid : Guid generated by Unity
        • <Description> : Add description inside.

 

  • Database
    • Table : |guid TEXT PRIMARY KEY NOT NULL|filename TEXT NOT NULL|filepath TEXT NOT NULL|indentlevel INT NOT NULL|description TEXT|
    • Indentlevel is not built yet.

 

Summary

It’s still not perfect, but please try and let me know your thoughts!