How novack/dbeditor works
Project type and purpose
• Type: Unity Editor extension / plugin
• Purpose: Provide a custom Editor window (“DBEditor”) inside the Unity Editor that displays and organizes ScriptableObject assets in a flexible tree hierarchy, with toolbar actions and an integrated inspector for editing.
File structure
• Top level:
– Assets/… contains the plugin source, resources, example/test data
– Packages/… contains this as a Unity Package (com.unity.package-manager-ui appears in tree but main code lives under Assets)
– ProjectSettings/… and UnityPackageManager/… are Unity boilerplate
• Key subfolders under Assets:
– Assets/Editor: entry points (menu items, windows)
– Assets/Plugins/Editor/TreeView: reusable TreeView framework and example code
– Assets/Sources/ConfigManager: core “ConfigManager” service, its attributes, inspectors, property drawers, and Editor UI for config
– Assets/Resources: JSON config (BillingMode.json)
– Assets/Test Data: sample ScriptableObject assets & types
README
• Confirms the tool is an Editor window for organizing ScriptableObjects
• Managed by a ScriptableObject asset that lists hierarchies and types
• Unity Editor Host (Unity.exe)
• DBEditor Window (custom EditorWindow)
• TreeView Framework (Plugins/Editor/TreeView)
• ConfigManager Service (loads/manages ScriptableObject config)
• ScriptableObject Assets (persistent data store)
• Inspector Panel (uses Custom Property Drawers)
• Resources Loader (reads BillingMode.json)
• Unity Editor Host → instantiates DBEditor Window via menu command
• DBEditor Window → queries ConfigManager to load hierarchy definitions
• ConfigManager → reads ScriptableObject config asset(s) & JSON resources
• DBEditor Window → passes data to TreeView Framework → renders tree nodes
• User selection in TreeView → triggers Inspector Panel → uses Custom Property Drawers → modifies ScriptableObject Asset → back to ConfigManager to persist changes
c. Architectural patterns / principles
• MVC-like separation:
– Model = ScriptableObject assets & config data
– View = DBEditor Window + TreeView + Inspector
– Controller/Service = ConfigManager, TreeViewControllers in examples
• Plugin modularization:
– TreeView lives under Plugins/Editor for reuse
– ConfigManager encapsulates config logic, with Custom Attributes & Drawers to keep UI decoupled
• Unity Package structure: leverages Unity’s ScriptableObject and EditorWindow APIs
d. Key technologies & libraries
• C# Editor scripting (EditorWindow, ScriptableObject, Attributes)
• UnityEditor.IMGUI / UIElements via TreeView plugin
• Custom Attributes & PropertyDrawers for runtime metadata
• JSON resource for auxiliary config
• Unity Package metadata under Packages/