Skip to content

Instantly share code, notes, and snippets.

@Chman
Chman / TransparentDepth.shader
Created February 14, 2017 15:20
Dummy transparent shader that writes to depth (per request)
Shader "Custom/Transparent Write To Depth"
{
Properties
{
_Color ("Color (RGBA)", Color) = (1.0, 1.0, 1.0, 0.5)
}
SubShader
{
Pass
{
@Chman
Chman / GetSetAttribute.cs
Created January 23, 2017 08:56
Property attribute / drawer
using UnityEngine;
/// <summary>
/// Allows the use of C# property as inspector values in Unity.
/// </summary>
/// <example>
/// <code>
/// [SerializeField, GetSet("SomeFloat")]
/// private float _someFloat;
/// public float SomeFloat
@Chman
Chman / gist:3158887
Created July 22, 2012 08:19
Kongregate API & Unity3D
// Kongregate API integration in Unity3D (UnityScript version)
//
// 1. Create a "KongAPI" game object in your very first scene.
// 2. Create a new script "KongAPI.js".
// 3. Fill it with the following code :
#pragma strict
static var isConnected:boolean = false;
static var userId:int = 0;