Skip to content

Instantly share code, notes, and snippets.

Dominik Haas DomDomHaas

Block or report user

Report or block DomDomHaas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Naphier / SimpleCSVDebug.cs
Created Nov 19, 2015
Simple class to log output to file for debugging.
View SimpleCSVDebug.cs
using System.IO;
using System;
using System.Text;
public class SimpleCSVDebug
string GetPathFile()
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string file = "output.csv";
stramit / UnityMethodValidator.cs
Last active Jun 10, 2019
Unity Method Validator
View UnityMethodValidator.cs
//Enable this if you want it to work in NUNIT, see the test example at the bottom
//#define UNIT_TESTING
* One of the frustrating things about Unity is that there are a spate of magic methods that can be
* called from the runtime. They do not have an interface defined, which by itself is pretty frustrating,
* but it can allow some valid c# that is bad Unity mojo. Consider a private 'OnEnable' function unity
rje / gist:11408219
Created Apr 29, 2014
audio spectrum code
View gist:11408219
using UnityEngine;
using System.Collections;
/// <summary>
/// A class for taking spectrum data & calculating the volume of various frequency bands.
/// Notes:
/// This doesn't do any smoothing, so wherever you leverage these values you'll probably want to do something.
/// In my project I immediately jump to any higher value, and then have it decay over time at a fixed rate.
/// </summary>
allanolivei / gist:9260107
Created Feb 27, 2014
Unity 3d : Get Selected Folder in Project Window
View gist:9260107
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public static class UnityUtil
public static string GetSelectedPathOrFallback()
string path = "Assets";
View PostBuildTrigger.cs
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
public static class PostBuildTrigger
private static DirectoryInfo targetdir;
private static string buildname;
private static string buildDataDir;
View Audio.cs
using UnityEngine;
using System.Collections;
public class CSBars : MonoBehaviour {
ereidland / StaticCoroutine.cs
Created Dec 11, 2013
Static Coroutine in Unity
View StaticCoroutine.cs
using UnityEngine;
using System.Collections;
public class StaticCoroutine : MonoBehaviour
private static StaticCoroutine _instance;
public static void Do(IEnumerator enumerator)
if (_instance == null)
anotheruiguy /
Last active Jul 7, 2018
Set up Node.js, Grunt and Node-Sass from scratch

Run the following steps inside a clean directory

Not sure if you are in the same boat as I, but I could not find any good resource out there that pulled this all together. So here is a step-by-step tutorial for creating a Node.js app from scratch, adding in Grunt and then Node-Sass. Yeah, try and find good docs on Node-Sass alone :(

Hope this is of help!

Create your Node.js project

  • npm init - create a clean node project
  • NOTE: be sure to add "private": true, to the package.json so that your project is not globally distributed as a npm app
fversnel / UnitySingleton.cs
Created Oct 15, 2013
Singleton implementation from the 'Unite 2013 - Internal Unity Tips and Tricks' talk (
View UnitySingleton.cs
using UnityEngine;
public class Example : MonoBehaviour
public static Example Singleton;
void OnEnable()
if (Singleton == null)
Singleton = this;
sttz / StoppableCoroutine.cs
Last active Feb 15, 2018
Simple wrapper around Unity coroutines (generator methods) that allows to stop them from the outside. Unity natively only allows this when starting the coroutine by using its lexical name.
View StoppableCoroutine.cs
using System;
using System.Collections;
using UnityEngine;
/// <summary>
/// Wrapper around coroutines that allows to start them without using
/// their lexical name while still being able to stop them.
/// </summary>
public class StoppableCoroutine : IEnumerator
You can’t perform that action at this time.