Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Cassano MultiversalNomad

View GitHub Profile
@elliotherriman
elliotherriman / choiceTags.js
Last active Mar 3, 2021
Method to allow tagging choices in Ink. Requires tag to be on the same line as the choice.
View choiceTags.js
// inkjs.Story
var story;
// check this flag when deciding whether to apply a tag
// necessary to prevent choice tag from applying to following line, in cases where the choice
// text is fully wrapped in square brackets (and so won't appear in the next passage)
// ensure that skipTag is set to false after skipping a tag, or reloading your story,
// and maybe in like four other places, just to be safe
var skipTag = false;
@mminer
mminer / Console.cs
Last active Feb 5, 2021
Unity script to display in-game debug console. Actively maintained version: https://github.com/mminer/consolation
View Console.cs
// NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation.
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A console to display Unity's debug logs in-game.
/// </summary>
public class Console : MonoBehaviour
{