Skip to content

Instantly share code, notes, and snippets.

/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
using UnityEngine;
using System.Collections;
public class MonoBehaviourSingleton<T> : MonoBehaviour
where T : Component
{
private static T _instance;
public static T Instance {
get {
if (_instance == null) {
.DS_Store
*.csproj
*.sln
*.pidb
*.userprefs
*.unityproj
/Temp
/Library
<EditorStyle name="MonoDevelop 2.4" _description="Old default MonoDevelop theme">
<Style name="text" color="#000000" bgColor="#FFFFFF" />
<Style name="text.background.readonly" color="#FAFAFA" />
<Style name="linenumber" color="#888A85" bgColor="#FDFDFF" />
<Style name="linenumber.highlight" color="#555753" />
<Style name="iconbar" color="#FDFDFF" />
<Style name="iconbar.separator" color="#BABDB6" />
<Style name="fold" color="#BABDB6" bgColor="#FDFDFF" />
<Style name="fold.highlight" color="#555753" />
<Style name="fold.togglemarker" color="#000000" />
//https://gist.github.com/col000r/6658520
//but all the hard work done by mstevenson: https://gist.github.com/mstevenson/4050130
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ShuffleBag<T> : ICollection<T>, IList<T>
{
private List<T> data = new List<T> ();
using System;
using UnityEngine;
using UnityEditor;
public class CreateQuadMesh : Editor {
[MenuItem("Assets/Create/Quad Mesh", false, 10000)]
public static void Create ()
{
Mesh mesh = BuildQuad (1, 1);
void GetComponentsInChildrenRecursive<T> (Transform parent, List<T> buffer)
where T : Component
{
foreach (Transform t in parent) {
var c = t.GetComponent<T> ();
if (c) {
buffer.Add (c);
}
GetComponentsInChildrenRecursive (t, buffer);
}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
/*
@birdinforest
birdinforest / Fps.cs
Last active August 26, 2016 06:09 — forked from mstevenson/Fps.cs
Show Fps.
using UnityEngine;
using System.Collections;
public class Fps : MonoBehaviour {
string label = "";
float count;
IEnumerator Start ()
{
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public class FileUtility {
/// <summary>
/// Determine whether a given path is a directory.
/// </summary>