Skip to content

Instantly share code, notes, and snippets.

View edwardrowe's full-sized avatar

Edward Rowe edwardrowe

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@robmiller
robmiller / git-cleanup-repo
Last active February 27, 2024 10:09
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@hecomi
hecomi / UnityCG.cginc
Created March 16, 2014 09:23
UnityCG.cginc@Unity 4.3.2f1
#ifndef UNITY_CG_INCLUDED
#define UNITY_CG_INCLUDED
#include "UnityShaderVariables.cginc"
#if SHADER_API_FLASH
uniform float4 unity_NPOTScale;
@winkels
winkels / CoroutineTimer.cs
Last active May 8, 2017 12:03
Unity script that creates a coroutine-based countdown timer. See http://www.asteroidbase.com/?p=853 for context.
using UnityEngine;
using System.Collections;
[System.Serializable]
public class CoroutineTimer
{
//public fields
public float TimerDuration, TimerRandomScaleFactor, TimerStartDelay;
public bool Repeats;
@terrehbyte
terrehbyte / UsefulUnityAssets.md
Last active March 28, 2024 22:35
Useful Open-Source Unity Assets

Useful Open-Source Unity Assets

This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.

Art / Design Tools

ProbePolisher - Light Probe Editor - keijiro

"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."

Code
Releases

@FreyaHolmer
FreyaHolmer / ScriptableObjectSpawner.cs
Last active January 8, 2020 06:51
ScriptableObject asset spawner for Unity
// Adds a menu item for easy creation of your ScriptableObject types
// Usage: Right click in project view -> Create -> ScriptableObject... -> Select your type
// It will land in the root of your assets folder with the same name as your class
// Freya Holmér - webmaster@acegikmo.com
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System.Linq;
using System.IO;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditorInternal;
#endif
public class ReorderableListAttribute : PropertyAttribute {}
@Bradshaw
Bradshaw / VectorExtensions.cs
Last active February 8, 2020 10:50
Quickly convert between various Vector2s and Vector3s
using UnityEngine;
public static class VectorExtensions {
public static Vector2 xy(this Vector3 v3)
{
return new Vector2(v3.x, v3.y);
}
public static Vector2 xz(this Vector3 v3)
{
@jringrose
jringrose / FindProjectReferences.cs
Last active June 17, 2022 21:34
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
/*
MIT License
Copyright (c) 2016 Jesse Ringrose
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Skybladev2
Skybladev2 / ExecutionOrderManager.cs
Last active June 29, 2023 11:20
Explicit script exection order for Unity scripts
using System;
using UnityEditor;
[InitializeOnLoad]
public class ExecutionOrderManager : Editor
{
static ExecutionOrderManager()
{
foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts())
{