Skip to content

Instantly share code, notes, and snippets.

View jbubriski's full-sized avatar

John Bubriski jbubriski

View GitHub Profile
jbubriski / BuildSceneProcessor.cs
Created November 8, 2016 16:23 — forked from mrcarriere/BuildSceneProcessor.cs
Automatically add a scene to your Build Settings when you create or save the scene. Scenes that are ignored will not re-prompt for the current session.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
// docs:
public class BuildSceneProcessor : UnityEditor.AssetModificationProcessor
private const string DIALOG_TITLE = "Add to Build Settings?";
private const string DIALOG_MSG = "Add to build settings for inclusion in future builds?";
jbubriski / LightFlickerEffect.cs
Created September 10, 2021 19:44 — forked from sinbad/LightFlickerEffect.cs
Unity simple & fast light flicker script
using UnityEngine;
using System.Collections.Generic;
// Written by Steve Streeting 2017
// License: CC0 Public Domain
/// <summary>
/// Component which will flicker a linked light while active by changing its
/// intensity between the min and max values given. The flickering can be
/// sharp or smoothed depending on the value of the smoothing parameter.
jbubriski / CollectionExtensions.cs
Created June 2, 2021 18:05 — forked from codeimpossible/CollectionExtensions.cs
Sound Effect Scriptable Object
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace NoirLib {
public static class CollectionExtensions {
private static readonly System.Random _rand = new System.Random();
public static T Random<T>(this T[] items) {
<!-- Have a bunch of redirects? Put them in a separate file -->
<rules configSource="Rewrites.config" />
<!-- Simple rewrite -->
<rule name="Simple redirect" stopProcessing="true">
<match url="^path/sub path/page\.aspx$" />
<action type="Rewrite" url="/newpath.aspx" />
jbubriski / GameManager.cs
Created November 23, 2017 00:03 — forked from codeimpossible/GameManager.cs
Cross Platform GamePad Input for Unity
using System;
using UnityEngine;
public class GameManager : MonoBehaviour {
public IInputSystem Input;
public static GameManager Instance;
void Awake() {
jbubriski / BehaviourButtonsEditor
Created November 17, 2016 15:45
Add editor buttons to your MonoBehaviours methods
using UnityEditor;
using UnityEngine;
namespace BitStrap
/// <summary>
/// Custom editor for all MonoBehaviour scripts in order to draw buttons for all button attributes (<see cref="ButtonAttribute"/>).
/// </summary>
[CustomEditor( typeof( MonoBehaviour ), true, isFallback = true )]
jbubriski / StopPlayingOnRecompile.cs
Created November 8, 2016 16:23 — forked from mrcarriere/StopPlayingOnRecompile.cs
Force Unity to stop playing if you have edited a source file. Helps avoid some editor crashes and false positives / error spam. To use, drop this script in an "Editor" folder in your project.
using UnityEditor;
public class StopPlayingOnRecompile
static StopPlayingOnRecompile()
EditorApplication.update += () =>
if (EditorApplication.isCompiling && EditorApplication.isPlaying)
body {
margin: 0px;
padding: 0px;
#player {
width: 100%;
height: 100%;
jbubriski / menus.js
Created January 14, 2016 16:52 — forked from phoboslab/menus.js
Z-Type Menu
MenuItem = ig.Class.extend({
getText: function(){ return 'none' },

Hello there! This is a sample post for, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.