Skip to content

Instantly share code, notes, and snippets.

View maggiechen's full-sized avatar

Maggie Chen maggiechen

View GitHub Profile
@BrodyB
BrodyB / SceneViewControlWindow.cs
Created December 30, 2019 21:18
How to make a Unity EditorWindow take and swallow input from the Scene View!
using UnityEditor;
using UnityEngine;
/// <summary>
/// This window shows how you can listen for and consume user input events
/// from the Scene View. Super useful for making editor tools!
/// </summary>
public class SceneViewControlWindow : EditorWindow
{
/// <summary>
@dirkk0
dirkk0 / main.cpp
Last active August 3, 2023 23:08
Basic SDL2 OpenGL application
// code nicked mainly from here:
// http://lazyfoo.net/tutorials/SDL/50_SDL_and_opengl_2/index.php
/* to compile
### installation on ubuntu
# install compiler etc
sudo apt-get install --yes software-properties-common g++ make
# install sdl2
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';