C# REPL tool for Unity3D built on Miguel's tool.
C#
Latest commit 435909a Sep 5, 2016 @MrJoy Notes to myself.
Permalink
Failed to load latest commit information.
Plugins
.gitignore Unity/iPhone wants files to have certain permissions. Bleah. Mar 12, 2010
Evaluator.cs Noise reduction for now. Jan 3, 2016
Evaluator.cs.meta Updating to Unity 4.3.x metadata. Dec 9, 2013
LICENSE Touch up metadata... Jan 6, 2016
LICENSE.meta Updating to Unity 4.3.x metadata. Dec 9, 2013
Plugins.meta
PrettyPrint.cs AStyle seems a bit less painfully limited, albeit buggy. Jan 4, 2016
PrettyPrint.cs.meta Updating to Unity 4.3.x metadata. Dec 9, 2013
README.textile Touch up metadata... Jan 6, 2016
README.textile.meta Updating to Unity 4.3.x metadata. Dec 9, 2013
ReflectionProxy.cs Tidy up. Nov 19, 2015
ReflectionProxy.cs.meta
Shell.cs Notes to myself. Sep 5, 2016
Shell.cs.meta Updating to Unity 4.3.x metadata. Dec 9, 2013
UnityREPLHelper.cs AStyle seems a bit less painfully limited, albeit buggy. Jan 4, 2016
UnityREPLHelper.cs.meta Converting to Unity 3.5 text-based metafiles. Feb 14, 2012

README.textile

OVERVIEW

UnityREPL is a REPL (Read, Eval, Print, Loop) tool based on Miguel’s CSharpRepl but for Unity.

What’s a REPL? See the Wikipedia article. or the demo videos on the Wiki.

INSTALLATION

Please note that this requires UnityGUIExtensions. The .unitypackage includes everything you need

NON-GIT, OR UNITY-INDIE SETUP

  • Grab the .unitypackage from the downloads page.
  • Open your project.
  • Click “Assets” → “Import Package…” from the menu, and select the file.

GIT SETUP IN A UNITY-PRO PROJECT THAT IS NOT VERSIONED WITH GIT

You must have External Version Control enabled to use these instructions. If not, please download the .unitypackage and use that.

  cd myproject/
  mkdir -p Assets/Editor/
  git clone git://github.com/MrJoy/UnityREPL.git Assets/Editor/UnityREPL
  git clone git://github.com/MrJoy/UnityGUIExtensions.git Assets/UnityGUIExtensions

By setting up this way, you can track updates using “git pull”.

GIT SETUP IN A UNITY-PRO PROJECT VERSIONED WITH GIT

You must have External Version Control enabled to use these instructions. If not, please download the .unitypackage and use that.

  cd myproject/
  mkdir -p Assets/Editor
  git submodule add git://github.com/MrJoy/UnityREPL.git Assets/Editor/UnityREPL
  git submodule add git://github.com/MrJoy/UnityGUIExtensions.git Assets/UnityGUIExtensions
  git submodule init
  git submodule update

USAGE

  • Click “Window” → “C# Shell”
  • Dock the new tab wherever you wish, and enjoy!

From this window you can enter C# code and run it. You should have access to all classes you’ve defined in C#, JavaScript, or Boo in your project.

COMPATIBILITY

Tested on Unity 5.3.1, but should work on slightly earlier versions down to, perhaps 5.0.

Will definitely not work on older versions of Unity (4.x and below).

DOCUMENTATION

Full documentation is available from within UnityREPL by clicking the ‘?’ button on the toolbar.

LICENSE

All original/novel code is Copyright © 2009-2016 Jon Frisby. All other code is the property of the respective authors.

Dual licensed under the terms of the MIT X11 or GNU GPL, as per the original code.

The included Mono.CSharp.dll is a completely unmodified copy from Mono 2.4., please see the Mono Project for details on obtaining source to it.

TODO

  • Undo functionality.
  • Editing history support (Bash style).
  • Smooth out some hiccups with assembly reloads.
    • Local vars getting blown away.
    • Make sure we’re not leaking references to things.
  • Add things to UnityBaseClass to help with Unity workflows.
  • Lots of other little things; see the source code for more info.