A Unity Importer for Obsidian Canvas Files

I wrote an importer for Unity that allows you to read .canvas files as a node graph in Unity. You could make a dialogue system, Quest system, or whatever else.


Screenshots in the github readme.

The concept is pretty simple, it’s just uses Unity’s built-in JSON parser to create a “CanvasObject” ScriptableObject that gets added to the .canvas asset in the editor. More or less par-for-the-course with these sorts of things. That’s what I like about this solution - plain text JSON files are flexible. You can edit your files in Obsidian, hop into Unity and it will just update.

I just put this together in a few hours to see if I could. I think it’s neat, but not realistic. It’s not “You shouldn’t use this” but rather “Why would you use this?”

Despite that, I made a proof-of-concept dialogue system. I like the idea of meaningful-to-unity text files that are referenced as file-nodes in obsidian, and the canvas as a simple GUI to connect them in some also-meaningful way. One thing existing node solutions don’t do well is connect other game assets together without feeling clumsy.

That being said, I still don’t actually think this is a good solution for game data. At least not without a plugin on the obsidian side of things to enforce good authoring behavior, and perhaps add custom JSON fields to nodes. Frankly, Unity’s internal node solution (GraphView) is chugging along, and plenty of other in-unity node solutions (like xNodes) exist and are quite good.

Posting this in Share/Showcase category because it doesn’t really seem like a plugins thing. “Nifty Hack” feels more accurate, haha.

1 Like