Skip to main content

AI-Assisted Dialogue Graph Tool

Unity Editor | C# & Editor Scripting | GPT-4o Assisted

About The Project

This project is a custom-built Dialogue Graph Editor created within the Unity Engine. It provides a visual, node-based interface for writing and structuring branching conversations for in-game characters. The entire tool was developed over the course of a week, leveraging GPT-4o for rapid prototyping and problem-solving.


Media Showcase

The custom Dialogue Editor window, showing a node-based graph where each node represents a line of dialogue that can be visually connected to others.
The custom Dialogue Editor window, showing a node-based graph where each node represents a line of dialogue that can be visually connected to others.
The custom Dialogue Editor window, showing a node-based graph where each node represents a line of dialogue that can be visually connected to others.The serialized DialogueData asset in the Unity Inspector, which stores the structured conversation data generated by the graph tool for use in-game.

My Role & Technical Contributions

As the sole developer, I designed and implemented this tool from the ground up.

  • AI-Assisted Prototyping: I worked collaboratively with the GPT-4o language model to architect and code the tool. This involved generating code snippets, debugging issues, and structuring the editor window logic, which significantly accelerated the development process.

  • Custom Unity Editor: I wrote the C# scripts to create a custom EditorWindow. This involved rendering nodes, handling mouse input for dragging nodes and creating connections, and designing the basic UI for the dialogue data within each node.

  • Data Serialization: I implemented a system to take the visual, node-based graph and serialize it into a usable ScriptableObject asset. This allows the dialogue created in the tool to be saved and easily referenced by other game systems.

Lessons Learned

  • AI as a Development Accelerator: This project was a powerful demonstration of how AI can transform the development workflow. What could have taken much longer by following a traditional tutorial was accomplished in just a week. The ability to ask specific questions and get contextual code solutions was a game-changer.

  • The Importance of Iteration: While the core functionality was achieved quickly, the process highlighted the iterative nature of tool development. The initial version is a solid foundation, but I immediately identified a clear roadmap of features needed to make it a truly polished and production-ready tool.

Future Improvements

This tool is a strong proof-of-concept, and with more time and prompting, I plan to achieve an ideal state with the following features:

  • Enhanced UI/UX: Improve the visual design and user experience of the graph editor.
  • Graph Navigation: Implement essential features like zooming and panning to make it easier to work with large, complex dialogue trees.
  • Node Connection Logic: Add rules to limit the number of connections allowed from a single node, preventing invalid dialogue flows.
  • Direct Asset Linking: The current workflow requires deleting and recreating the dialogue asset. A major future goal is to have the editor directly link to and update the ScriptableObject, allowing for seamless, real-time editing.