Skip to content

Instantly share code, notes, and snippets.

View TylerCode's full-sized avatar
:octocat:
Probably making something, I have too many repos...

Tyler C TylerCode

:octocat:
Probably making something, I have too many repos...
View GitHub Profile
@LotteMakesStuff
LotteMakesStuff / TrafficLightAttribute.cs
Last active April 8, 2025 21:13
TrafficLight control/layout/property drawer: Adds a new editor control that draws lil Traffic Lights in the inspector. its really useful for visualizing state. For example, checkboxes can be hard to read at a glace, but a Red or Green status light is easy! Recommend you use the attached package, as it has all the icon image files.
// Non Editor code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class TrafficLightAttribute : PropertyAttribute
{
public bool DrawLabel = true;
public string CustomLabel;
public bool AlsoDrawDefault;
@jagwire
jagwire / gist:0129d50778c8b4462b68
Created December 11, 2014 15:12
Unity command line script to build WebGL player
//place this script in the Editor folder within Assets.
using UnityEditor;
//to be used on the command line:
//$ Unity -quit -batchmode -executeMethod WebGLBuilder.build
class WebGLBuilder {
static void build() {
string[] scenes = {"Assets/main.unity"};