This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEditor.Macros; | |
using UnityEngine; | |
/// <summary> | |
/// Allows use of the undocumented MacroEvaluator class. Use at your own risk. | |
/// </summary> | |
public class Macros : EditorWindow | |
{ | |
string macro = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Creates a prefab from a selected game object. | |
/// </summary> | |
class CreatePrefabFromSelected | |
{ | |
const string menuName = "GameObject/Create Prefab From Selected"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation. | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// A console to display Unity's debug logs in-game. | |
/// </summary> | |
public class Console : MonoBehaviour | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STATUS=`defaults read com.apple.finder AppleShowAllFiles` | |
if [ "$STATUS" = TRUE ]; then | |
defaults write com.apple.finder AppleShowAllFiles FALSE | |
else | |
defaults write com.apple.finder AppleShowAllFiles TRUE | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// Creates wandering behaviour for a CharacterController. | |
/// </summary> | |
[RequireComponent(typeof(CharacterController))] | |
public class Wander : MonoBehaviour | |
{ | |
public float speed = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Marquee : MonoBehaviour | |
{ | |
public string message = "Where we're going, we don't need roads."; | |
public float scrollSpeed = 50; | |
Rect messageRect; | |
void OnGUI () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// Creates wandering behaviour for a CharacterController. | |
/// </summary> | |
[RequireComponent(typeof(CharacterController))] | |
public class Wander2 : MonoBehaviour | |
{ | |
public float speed = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Saves URL(s) to a user's Pocket queue. | |
It accepts either command line arguments or a URL from the OS X clipboard. | |
For information about Pocket see http://getpocket.com/ | |
""" | |
import optparse | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
class MoveToOrigin | |
{ | |
/// <summary> | |
/// Moves selected game object(s) to (0, 0, 0). | |
/// <summary> | |
/// <remarks>Keyboard shortcut: shift-cmd-0 (Mac), shift-ctrl-0 (Windows).</remarks> | |
[MenuItem ("GameObject/Move To Origin #%0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import tornado.web | |
class JsonHandler(BaseHandler): | |
"""Request handler where requests and responses speak JSON.""" | |
def prepare(self): | |
# Incorporate request JSON into arguments dictionary. | |
if self.request.body: | |
try: |
OlderNewer