Free Open Dev Console/Terminal (both Runtime and Editor)

So I’ve been working on a dev console/terminal system in my free time. It should feel familiar to anyone who has used a UNIX-like system.

The latest package can be downloaded here (please note that these builds are automatic and untested): http://dl.dropbox.com/u/33426743/OpenGameConsole/Packages/OpenGameConsole-current_auto.unitypackage

  • Traverse the hierarchy (Game Objects as Directories, Components as Files)
  • Send messages to game objects
  • Alter physics settings
  • Alter time settings
  • Replacement patterns
  • Custom commands
  • Help and manual pages
  • Aliases
  • Edit properties and fields on components

I may add support for some more bash-like commands like cp, cat, etc.

The code for the stream is seperated from the GUI, allowing you to develop a custom terminal for it (or even send the data over a port and remote control Unity).

I’ve released a very initial version on GitHub, under the MIT license:

https://github.com/Thinksquirrel-Software/OpenGameConsole

To install, place the contents in the Assets folder of a project.

Please note that it is currently provided as-is. Plenty of work still needs to be done, including the streamlining of command parsing, proper aliasing of commands, an editor interface for modifying commands, and an editor console window.

If you decide to try it out, be aware that future versions will likely break older ones right now. Also, let me know if you have any feedback or would be interested in contributing to the project!

Anyways, try it out for yourself - here’s the link to the automatic web build.

http://dl.dropbox.com/u/33426743/OpenGameConsole/Builds/Web/Web.html

Let me know if you have any feedback, or any specific features that you’d like to see implemented into the core program (note, I’m staying away from game-specific things like godmode and noclip, because the methods that they work will need to differ from game to game - hence the custom command system).


Was looking this over…nice rainbow poptart kittie…

but srsly, I’m, liking it. Nice job. I can see this coming in handy for a lot of people.

Awesome, thanks! This week, I’ll streamline it so that commands are easier to make, and create the editor interface for them. Once that’s finished, I’ll release the source =)

I was in the market to do this very same thing. I just haven’t had the time to go and make it. Seems like you have covered most of what I wanted to do! One thing I wanted to do, is add an advanced object spawning system. One where you can spawn an object and then imediately activate an advanced interactive object move system. This would create arrows for the users to move, rotate or scale the object and place it in the level. I also wanted it to to make the object turn red if it is colliding with something etc. The last feature I wanted was to enable a save level option that can save the objects positions to the level so that when you restart or reload all the new tweaks you made stay.

I assume by sending messages to objects you can kill objects as well?

If you want to implement these ideas yourself you can, but if not I will definitely want to add them myself once I get the time to work on it.

Thank you so much for giving this away!

I love you, ThinkSquirrel. :slight_smile:

No problem :smile:

Most of those are a bit game specific (for example, there are many ways to spawn objects). I’ll probably add environment variables that can be made with other scripts, as well as access to the resource folders, though. With that plus the right commands, you can do pretty much anything.

Hello,

call me an idiot, but i’m not able to open the console on a MacBook Pro with german keyboard layout …Any help is appreciated :slight_smile:


oxl

thats awesome! gonna try it later tonight. Thanks!

Is this no longer available? I would love to have gotten a copy of this? :slight_smile:

-Dane

my apologies - it uses the backquote key (~) for the console. I’ts configurable though - I’ll upload a build with a more common key later.

I haven’t released it yet =P It will be available soon.

Ah, when I meant objects, I should have said prefabs. Most things that you would want to spawn at runtime would be prefabs. Just like debugging your level for a while and near the end of the level you think, there needs to be truck over there and some oil drums stacked in the back of it near the point where the next firefight will break out. Maybe a health pack in the bed of the truck to to heal up too. Fire up the console, and spawn each prefab which will allow you to gain full movement of the object in 3D space, probably toggling through movement, rotation and scale modes. Place it and done, spawn another till finished. Then there would need to be some way to save these objects to the level without saving the states of the other objects that have been moved. That might be tricky, but would be very useful. Maybe generate save boxes that can save all items they are in contact with to keep in the level. That is getting rather complex though.

Look at Antares Addon. I have wrote something like this a long time ago and it’s open source. May be you’ll find something handy for you here : http://forum.unity3d.com/threads/47696-Antares-Project-(Open-Source)-1.5.5-Coming-soon?p=389059&viewfull=1#post389059

Looks awesome, Neodrop! I’ll take a look at it - I wasn’t sure of how to go about catching Unity’s log. I’m still working on the editor version of the console as well, and your layout has given me a few ideas (the tabs up top, for example)

Does your console allow input commands? I’m currently trying to find a good way to parse the commands. Right now I’m using a lot of hacked together String.Split, Replace etc, but I’d rather use something like Regex queries or something at least more organized.

Best way to parse commands is simple: command argument argument argument etc… make all the commands and arguments one word or conjoined with _. If the command takes a string, require it be surrounded by a special character you can easily parse out. That way you can parse out each command by way of identifying the next space and then try to call the function if it exists, if it does exist, pass the parameters to that function as listed. If it blows up, catch the error and call the commands help function.

That is of course assuming that each command is a script or has a specific help function format you can call for the specified action. I haven’t looked at your code yet, but having each cmd be its own script would allow scalability and customization to drag and drop CMD script defs to it or add the new script def name to a list of all scripts available to the cmd main class.

Would that work? I haven’t scripted in Unity in a while.

No. My Console in Antares Addon is only extended version of the standard Unity Console window. I don’t need a commands in it (especialy because I work only in my Universe and here I have all, what I can imagine for debagging).
But, if I need it, I would do it somethink like this :

ObjectName @commandName(Type0, Type1, Type2) #argument0 #argement1 #argement2

Or, may be I would have preferred a long way with fully customizable Call window, where showing all components of the selected Object and all their method’s… It’s possible, but not so quick like the first one.

Nice ! Thank you !


oxl

with my german keyboard layout i cant open the terminal -.- xD

Just updated the demo to use the ‘c’ key for activating the console.

I’m doing something similar, separating arguments with commas. I may change it to: command -boolargument -argument=somethingelse requiredargument1 requiredargument2 though. Similar to terminal commands, and a bit easier to parse.

Each command is a method (either static, or an instance method on a game object). You specify it as a string, the system looks it up via reflection, then stores the direct method call in a dictionary for use later.