Skip to content

Instantly share code, notes, and snippets.

Avatar

Shane Celis shanecelis

View GitHub Profile
@HAliss
HAliss / CurveDissolve.shader
Last active Mar 5, 2021
Creates a monochromatic texture with color values from a given animation curve
View CurveDissolve.shader
Shader "Custom/CurveDissolve"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Noise("Noise", 2D) = "white" {}
_CurveTexture("Curve texture", 2D) = "white" {}
_Cutoff("Cutoff", Range(0,1)) = 0
_Glossiness ("Smoothness", Range(0,1)) = 0.5
@GammaGames
GammaGames / hue.py
Last active Jan 23, 2022
kano wand + phillips hue
View hue.py
from kano_wand.kano_wand import Shop, Wand, PATTERN
from qhue import Bridge
import moosegesture as mg
import time
import random
import math
class GestureWand(Wand):
def post_connect(self):
self.gestures = {
View UnityEditorCameraSpeed.cs
using System.Reflection;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public class EditorCameraSpeed
: EditorWindow {
[MenuItem("Tools/Camera Speed &S")]
public static void CameraSpeed() {
var window = GetWindow<EditorCameraSpeed>();
@LotteMakesStuff
LotteMakesStuff / InspectorButtonsTest.cs
Last active Jul 1, 2021
Code running pack! two property drawing scripts that make it super easy to trigger code via buttons in the inspector, and get feedback! [TestButton] draws you little buttons that call a method on your MonoBehaviour, and [ProgressBar] give you a great way to show feedback from long running methods. These are *super* helpful for things like proced…
View InspectorButtonsTest.cs
using UnityEngine;
using System.Collections;
public class InspectorButtonsTest : MonoBehaviour
{
[TestButton("Generate world", "DoProcGen", isActiveInEditor = false)]
[TestButton("Clear world", "ClearWorld", 2, isActiveInEditor = false)]
[ProgressBar(hideWhenZero = true, label = "procGenFeedback")]
public float procgenProgress = -1;
@phosphoer
phosphoer / SimpleGeo.cs
Last active Aug 12, 2021
Simple Geometry Painter for Unity
View SimpleGeo.cs
// The MIT License (MIT)
// Copyright (c) 2016 David Evans @phosphoer
// 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 furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@anyuser
anyuser / Matrix3x3.cs
Last active Nov 20, 2018
2D Transformation matrices for use in Unity
View Matrix3x3.cs
using UnityEngine;
public struct Matrix3x3
{
// m#row#col
public float m00;
public float m01;
public float m02;
public float m10;
public float m11;
@robertwahler
robertwahler / Shortcuts.cs
Last active Aug 10, 2018
Unity Shortcuts via Reflection
View Shortcuts.cs
using UnityEditor;
using UnityEngine;
using UnityTest;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace SDD.Editor {
/// <summary>
@scooooooooby
scooooooooby / new-post.sh
Last active Oct 26, 2015
Create Jekyll posts with their YAML matter quickly from the command line.
View new-post.sh
#!/bin/bash
echo "Title of post:"
read title
echo "Description of post:"
read description
echo "Tag post:"
read tags
@chrisdone
chrisdone / AnIntro.md
Last active Jan 11, 2022
Statically Typed Lisp
View AnIntro.md

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:

@stramit
stramit / CustomEvents.cs
Created Sep 4, 2014
Sending Custom Events via the EvenSystem
View CustomEvents.cs
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}