Inklewriter ported to C# and Unity

Hi everyone,

I’ve recently been using inklewriter as a prototyping tool for a game I’m implementing in Unity. To this end, I’ve ported the Inklewriter player to C# and have put together a simple example scene that replicates the inklewriter web UI using standard Unity 5 UI components.

The port is fairly stable and complete at this point, so I’ve released the code on GitHub:

I’d love to know what you think!

Michael

Could you post a screenshot? What do your Unity examples look like out of the box?

Hi Dan, I’ve edited my original post to include a screenshot. The Unity package includes a compiled InklewriterSharp DLL, a set of Unity 5 UI widgets that replicate the inklewriter web UI, and an example scene that plays the Musgrave Ritual story.

Each UI widget has an attached component that implements a “Set” method. “Set” takes an appropriate object from the InklewriterSharp story player and modifies the UI state accordingly. For example, the TextBlock widget takes a Paragraph object, which contains body text and an optional image to be displayed.

This is currently just a pure port of the existing inklewriter web player, however once I’m reasonably certain that it runs existing stories correctly I’ll consider expanding its functionality to layer on features that are likely to be more useful in a graphical environment.

I also wanted to clarify, this is a completely unofficial port, but I’ve received permission from inkle to make it available. These libraries may be used both commercially and non-commercially so long as credit is given to inkle studios.

I am excited about this port and look forward to seeing where you take this next!

I am following this with interest.

Thank you for putting this together. I hope to use it in a future Unity project. :smiley:

Hi!

First of all thank you for your great contribution!

I’m using the player, and I wondered if it supported markers? I’ve imported a story in Unity, but certain options that are dependant on markers do not show up when they should.

Thanks

This is great! I have an issue with the example project though, whenever I advance to one of the next pages, the entire thing scrolls down to the very bottom instead of starting at the top like it should. Any idea why this is happening?

Here is an example at the beginning where it scrolls past the picture, cutting it off:

Here is another example 2 clicks later where it scrolls down too far and cuts off a good amount of text at the top as well as the image:

I was literally just wishing inklewriter could be ported to Unity, and voila, found this. I’m going to give it a shot sometime this week, this looks awesome.

So great to see this.

Any chance you can adapt a version to work with the new Unity-Ink integration? The json files it produces don’t seem compatible with the current version of your system. If not, any thoughts on how to reformat the json files Inky produces to fit this player?