Skip to content

Instantly share code, notes, and snippets.

@petereichinger
petereichinger / Sprites-Emission.shader
Created July 7, 2016 10:37
Sprite shader with an emission map in the material
Shader "Sprites/Diffuse Emit"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_EmissionTex ("Emission Texture", 2D) = "white"{}
_Color ("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
}
@petereichinger
petereichinger / ShowUsages.cs
Last active May 22, 2016 17:40
Show Usages of MonoBehaviours
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System;
/// <summary>
/// Add the 'Show Usages' menu item which lists all usages of a script in prefabs.
/// This is useful to check if a script is still used anywhere.
/// </summary>
@petereichinger
petereichinger / markdown-to-pdf.py
Last active August 29, 2015 14:10 — forked from Beyamor/markdown-to-pdf.py
markdown to pdf with additional packages
import os, sys
markdown_name = sys.argv[1]
name = markdown_name.split(".")[0]
latex_name = name + ".tex"
os.system("pandoc -f markdown -t latex %s -o %s" % (markdown_name, latex_name))
with open(latex_name, "r") as latex_file:
latex_content = latex_file.read()