View Bush Shader Indirect Color.shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Instanced/BushShader" { | |
Properties{ | |
_MainTex("Albedo (RGB)", 2D) = "white" {} | |
_Color0("Color0", Color) = (0,0,0,1) | |
_Color1("Color1", Color) = (1,1,1,1) | |
_Cutoff("Alpha cutoff", Range(0,1)) = 0.5 | |
_FadeStart("Fade start", Float) = 10000.0 | |
_FadeEnd("Fade end", Float) = 11000.0 | |
_WaveAmount("Wave Amount", Float) = 0.1 | |
_WaveSpeed("Wave Speed", Float) = 1.0 |
View SortedGizmos.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public static class SortedGizmos | |
{ | |
static List<ICommand> commands = new List<ICommand>(1000); | |
public static Color color { get; set; } |
View Screenshotter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using UnityEngine; | |
using UnityEditor; | |
/* | |
AUTHOR: Stijn Raaijmakers @bugshake |
View ObservableProperty.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get an event when a property changes | |
public class ObservableProperty<T> | |
{ | |
T value; | |
public delegate void ChangeEvent(T data); | |
public event ChangeEvent changed; | |
public ObservableProperty(T initialValue) | |
{ |
View RigidbodyInspector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
[CustomEditor(typeof(Rigidbody))] | |
public class RigidBodyInspector : Editor | |
{ | |
public override void OnInspectorGUI() | |
{ | |
Rigidbody target = (Rigidbody)this.target; | |
if (DrawDefaultInspector()) |
View ReadableID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ReadableID | |
{ | |
static readonly string[] syllables = new string[256]; | |
public static void initOnce() | |
{ | |
string[] consonants = new string[] { "b", "br", "c", "ch", "d", "f", "fr", "g", "h", "j", "k", "kn", "l", "m", "n", "p", "pr", "qu", "r", "s", "st", "sl", "sc", "t", "tr", "v", "w", "x", "z" }; | |
string[] vowels = new string[] { "a", "e", "i", "o", "u", "y", "ae", "ee", "ea", "ai" }; | |
for (int i = 0; i < syllables.Length; ++i) | |
{ |
View MeshInspector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// author: Stijn Raaijmakers (@bugshake) | |
// date: 11 sep 2016 | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
/// <summary>Add this component to any GameObject with a MeshFilter, then select it in the editor</summary> | |
public class MeshInspector : MonoBehaviour |