Skip to content

Instantly share code, notes, and snippets.

@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>
@gaspard
gaspard / gist:1048415
Created June 27, 2011 06:53
Compile time hash evaluation
// Usage:
// H("foobar") ===> replaced by uint during compilation
// macro hashing function by http://chrissavoie.com/index.php?option=com_content&task=view&id=14&Itemid=1
#define HASH_CONSTANT 5381
// The following is the guts of the compile-time hasher