A sample demonstrating how to integrate the Ink narrative scripting language with Luna's VisualNovel component. Supports choices, branching dialogue, and Luna text effects.
Lives in com.cupkekgames.inkbridge (sibling package, installed via the CupkekGames UPM scoped registry through the Package Manager) — see the Ink package page for the runtime API.
com.cupkekgames.inkbridge via Tools > CupkekGames > Package Manager (or add it from the scoped registry manually).com.inkle.ink-unity-integration) — third-party, install separately per inkle's instructions.Window > Package Manager > In Project > CupkekGames Ink Bridge > Samples.❗ Ink Unity Integration is a required prerequisite. It's third-party — the CupkekGames Package Manager can't install it for you. Without it, the demo scenes won't compile.
com.cupkekgames.luna (Asset Store; its declared deps come bundled)com.cupkekgames.inkbridge (pulls in com.cupkekgames.keyvaluedatabases for the story character database)com.inkle.ink-unity-integration (third-party, installed separately)InkStoryControllerBase (CupkekGames.Luna.Ink) — wraps the Ink.Runtime.Story and binds/unbinds your Ink external functions. The sample's VisualNovelInk.cs / SpeechBubbleInk.cs do the actual driving: feeding dialogue lines, presenting choices, and handling end-of-story.Samples~/Ink/ in the package):
InkDemo.unity — the main visual-novel demo: branching story, choice popups, avatars.InkDemoMultipleSpeechBubbleWorldSpace.unity — multiple world-space speech bubbles driven by one story.InkDemoTextEffects.unity — Luna text effects inside Ink lines.Samples~/Ink/InkDemo/ — InkStoryControllerExample.cs, VisualNovelInk.cs, SpeechBubbleInk.cs, InkCharacter.cs.Subclass InkStoryControllerBase to wrap your compiled Ink JSON and bind any external functions your story calls (this mirrors the sample's InkStoryControllerExample.cs):
using UnityEngine;
using CupkekGames.Luna.Ink;
public class MyStoryController : InkStoryControllerBase
{
public MyStoryController(TextAsset inkJSON) : base(inkJSON) { }
protected override void BindInkFuctions() => // (sic — method name as in source)
Story.BindExternalFunction("SetAvatar", (int slot, string name) => { /* swap portrait */ });
protected override void UnbindInkFuctions() =>
Story.UnbindExternalFunction("SetAvatar");
}Story exposes the raw Ink.Runtime.Story (use Story.Continue() / Story.currentChoices to drive a VisualNovelController); call Dismiss() when the story ends to unbind the external functions.
See also: VisualNovel component for the Luna UI side, and Speech Bubble for the bubble variant the world-space demo uses.
Settings
Theme
Light
Contrast
Material
Dark
Dim
Material Dark
System
Sidebar(Light & Contrast only)
Font Family
DM Sans
Wix
Inclusive Sans
AR One Sans
Direction