Tip: Play from TextMate

How to get to work:

  1. In TextMate press Command+Alt+Control+B (or Bundles->BundleEditor->Show Bundle Editor).
  2. In section “Unity JavaScript” add New Command “Play”.
  3. Save: All Files in Project.
  4. Command(s):
osascript -e '
[INDENT]tell application "System Events"[/INDENT]
[INDENT][INDENT]tell application "Unity" to activate[/INDENT][/INDENT]
[INDENT][INDENT]tell process "Unity"[/INDENT][/INDENT]
[INDENT][INDENT][INDENT]tell menu bar 1[/INDENT][/INDENT][/INDENT]
[INDENT][INDENT][INDENT][INDENT]tell menu "Edit"[/INDENT][/INDENT][/INDENT][/INDENT]
[INDENT][INDENT][INDENT][INDENT][INDENT]click menu item "Play "[/INDENT][/INDENT][/INDENT][/INDENT][/INDENT]
[INDENT][INDENT][INDENT][INDENT]end tell[/INDENT][/INDENT][/INDENT][/INDENT]
[INDENT][INDENT][INDENT]end tell[/INDENT][/INDENT][/INDENT]
[INDENT][INDENT]end tell[/INDENT][/INDENT]
[INDENT]end tell[/INDENT]
'
  1. Input: None
  2. Output: Discard
  3. Activation: Key Equivalent Command+P
  4. Scope Selector: source.js

What to do:
Press Command+P in TextMate

How it works:

  1. Save all files.
  2. Activate Unity3D
  3. Click Play

Awesome work! You should wikify this at http://unifycommunity.com/wiki/

Notice that Neil has a similar setup in his text mate bundle. Not sure where he hosts that. And personally I’d go with Neils setup where nothing is saved just because you decide to play what you have.