Skip to content

Instantly share code, notes, and snippets.

@stramit
stramit / CustomEvents.cs
Created September 4, 2014 06:16
Sending Custom Events via the EvenSystem
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
@pigeon6
pigeon6 / Unlit-CastShadow.shader
Created December 7, 2012 23:11
Unlit texture shader which casts shadow on Forward/Defered
// Unlit texture shader which casts shadow on Forward/Defered
Shader "Unlit/Texture CastShadow" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Tags {"Queue"="Opaque" }
LOD 100
@keijiro
keijiro / unity-animated-gif.md
Created August 12, 2012 08:48
Unity の画面を Animated GIF に変換して Tumblr にアップする

Unity の画面を Animated GIF に変換して Tumblr にアップする

超ニッチですが、メモとして。

Tumblr 側の制限

GIF ファイルの容量を 1MB 未満にしないと再変換されてしまう。よって、いかに容量を小さくするかというのが焦点になる。

  • 画像サイズを小さくする。
  • 色数を少なくする。
@darktable
darktable / SavWav.cs
Created April 6, 2012 05:01
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions: