Skip to content

Instantly share code, notes, and snippets.

View BrianMacIntosh's full-sized avatar

Brian MacIntosh BrianMacIntosh

View GitHub Profile
using System.Collections.Generic;
using System.Globalization;
using UnityEditor;
using UnityEngine;
/*
Copyright (c) 2019-2020 Brian MacIntosh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@BrianMacIntosh
BrianMacIntosh / DialogueDesignerExample.cs
Last active October 16, 2021 05:34
Bare-bones example of using the Dialogue Designer Unity package (https://github.com/BrianMacIntosh/DialogueDesignerUnity)
using UnityEngine;
// Include the DialogueDesigner namespace
using DD;
/// <summary>
/// Complete example that plays a Dialogue Designer dialogue in the unity debug console.
/// Use the number keys to make choices.
/// </summary>
public class DialogueDesignerExample : MonoBehaviour
@BrianMacIntosh
BrianMacIntosh / Image2.cs
Created March 4, 2021 18:03
Shader for Unity UI that uses a four-color gradient, and custom Image component for using the shader with Sliced images.
using UnityEngine;
using UnityEngine.UI;
// Based on the Unity built-in image source (Unity Reference-Only License, https://unity3d.com/legal/licenses/Unity_Reference_Only_License)
// Modified to add full-mesh UVs by Brian MacIntosh
namespace UI
{
/// <summary>
/// Image override that fills the second UV channel with uniform UVs over the entire image.