Vixen
02b45cc4
csharp
public static class AssetTree

Turns the asset database's flat index into the shape a browser shows.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The database is a dictionary and a browser is a tree, and this is the whole of the difference. Entries is every asset with its full path and nothing else — which is the right shape for "what is this GUID" and the wrong one for "what is in this folder".

⚠ Pure, and deliberately not a live view. Nothing here watches the file system. A browser rebuilds after a scan, which is the moment the database itself changed; a tree that tried to stay current would be a second source of truth for what is on disk.

Fields and properties (1)

  • public const string RootName

    What a browser calls the folder every asset is under.

Methods (3)

  • public static AssetTreeNode Build(IReadOnlyCollection<AssetEntry> entries, string rootName = "Assets")

    Builds the tree for a project.

  • public static AssetTreeNode? Find(AssetTreeNode root, string path)

    Finds a node by its project-relative path.

  • public static AssetTreeNode Filter(AssetTreeNode root, string? query)

    Narrows a tree to what matches a search, and to the folders holding it.

Used by (3)

  • AssetTreeTestsVixen.Editor.Core.Tests
  • BuilderVixen.Editor.Core
  • ProjectBrowserVixen.Editor.App