Skip to content

Instantly share code, notes, and snippets.

@GOROman
GOROman / Zaoriku.cs
Last active August 29, 2015 14:04
おお ゆにてい よ、しんでしまうとはなにごとだ!
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
// Unity にザオリク機能を追加します
[InitializeOnLoad]
static class Zaoriku
{
static Zaoriku() {
EditorApplication.playmodeStateChanged += OnPlaymodeChanged;
@benblo
benblo / EditorCoroutine.cs
Created April 15, 2014 13:26
EditorCoroutine: coroutines for Unity editor operations. Usage: EditorCoroutine.start(myIEnumerator)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Swing.Editor
{
public class EditorCoroutine
$(document).ready(function() {
var embedGist = function () {
$('a[href^="https://gist.github.com"]').each(function(i) {
if (writeCapture) {
var wrapper = $("<div></div>");
wrapper.insertAfter(this);
writeCapture.html(wrapper[0], '<script src="'+$(this).attr("href")+'.js"></script>');
$(this).remove();
} else {
@liammclennan
liammclennan / gist:8949046
Last active January 23, 2017 05:18
Simple, re-useable state machine (c#)
// this script works in linqpad (https://www.linqpad.net/)
void Main()
{
var day = new DaysRevisions();
day.State.Dump();
day.State.To(LifecycleState.Draft, "me");
day.State.Dump();
day.State.To(LifecycleState.Historical, "me");
}
@AlexTiTanium
AlexTiTanium / ParticaleAnimator.cs
Created May 30, 2013 08:27
Time scale independent Particle system in unity3d
using UnityEngine;
using System.Collections;
public class ParticaleAnimator : MonoBehaviour {
private void Awake()
{
particle = GetComponent<ParticleSystem>();
}
@wmiller
wmiller / Events.cs
Last active October 22, 2023 06:39
Unity3D Event System
using System.Collections;
using System.Collections.Generic;
public class GameEvent
{
}
public class Events
{
static Events instanceInternal = null;