Skip to content

Use a cached database to track embedded graphs in closed scenes and prefabs #1

@chocola-mint

Description

@chocola-mint

(Due to conscription I won't be able to work on this properly until April 2024. In meantime if anyone wants to take on this feature, feel free to do so)

This feature will allow Graph Lens and Graph Analyzer to run queries against graphs that aren't actually loaded at the time of query, enabling the use of embedded graphs.

This should be done by building a per-project database that fetches all graph data on initial creation, and then dynamically adds entries to the database as the developer adds new embedded graphs in scenes and prefabs. The database, represented by the class GraphDatabase, should support:

  • Rebuild: A heavy operation that opens every scene and prefab to extract searchable data (type information, node name, etc.) and trace data (how to "jump" to the node, similar to classes that implement IGraphElementTrace). There should also be an easy way to manually trigger Rebuild (maybe as a menu item in Tools?)
  • Save/Load: Automatically performed. GraphDatabase should be serialized and stored in a temporary folder (perhaps the built-in Temp folder?) and deserialized when the project is loaded.
  • Iterate Units/States/StateTransitions/StickyNotes: Similar to the static methods found in GraphTraversalUtility, it should be possible to easily enumerate nodes for querying.
  • Update: Dynamically update the database's contents as the currently-edited graph is changed.
  • Update Schema: GraphDatabase should contain a version field so that when the schema (ie. what fields are in each entry) is changed, the database will automatically rebuild.

Once GraphDatabase is complete, we can migrate GraphUtility's query methods to query against the database instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions