[ANNOUNCEMENT]EasyConsole: An in-game console

EasyConsole is now available on the asset store

What is it
EasyConsole is an in-game console that allows you to watch debug messages in real-time and also execute commands from within a running unity application. It has support for custom commands and it can also call methods on objects in the scene. EasyConsole is build in a way that makes it easy to add your own commands. Also, the gui part is completely separate from the back-end allowing multiple gui solutions. EasyConsole by default includes an unity gui and a NGUI frontend

EasyConsole is useful when developing multiplayer games or when debugging platform specific problems. It also allows you to quickly test methods because you can call them directly from the console.

Features

  • Display of debug logs
  • Support for directly printing into the console
  • Custom commands that can use any amount of parameters
  • Calling of normal methods on components
  • Proper parsing of command including support for escaped characters. For gameobjects with spaces in them, the space needs to escaped with a ‘\’.
  • Display of gameobject, components and methods to easily navigate through the scene
  • Help system using an attribute to add a help message to the custom commands
  • Custom parsers to be able to parse your own defined types. Built-in parsers for int, float and string. Also includes an example parser for Vector3
  • Easy to change the gui or use a different GUI system altogether. Includes a unity gui and a ngui front-end.
  • Includes various built-in commands and also includes an example field watch command script to show field values on the screen at runtime.
  • Works on Webplayer, Standalone, iOS and Android

Where can I get it?
The asset is now available on the asset store

FAQ
Q. This asset overwrites my NGUi files. How can I stop it from doing that?
A. Because the included NGUI version is the free one. some files are different, Unity will automatically overwrite existing NGUI files because of this. To solve that, you need to deselect the NGUI folder during the import of this asset.

Finished the documentation. Still got to squash a few bugs, but then it is ready for release.

A preview of the manual can be found here and the code documentation can be found here

price? :smile:

I’m not completely sure yet what price I’m going to give it, but I will most likely price it at $25.

The asset has been submitted to the Asset Store. Approval shouldn’t take long, so expect this asset to be available beginning next week.

The asset has been accepted by Unity and can be found here

I found a small bug where the GUI would keep stealing the keyboard focus even when closed. This has been fixed and an update has been submitted to the asset store. It will probably go live on Monday.

The update is live, and I also fixed another small bug where a persistent console would cause an error on level load.

Very cool. I was thinking of doing this asset myself but you saved me the effort :slight_smile: Will probably buy in a while.

Cheers

/Cal

Hi,

Question: did the package modify the original NGUI scripts once I have installed it?! Because it looks like it did, I hope it did not.

The NGUi bit that is included, is made using NGUI free. If you already have NGUI, then make sure you deselect the whole NGUI folder during importing.

Thank you very much. Sorry if I doubted about it, I will spend more time on it and let you know.

ok, my new concern is now that NGUI author updates NGUI code really quickly. I mean like weekly quickly.
Moreover their philosophy is not to care about retro compatibility. So often names, functions or even entire classes change.
I.E.: your code seems to use UIButton that is not supported anymore (AFAIK).

Hi there Zerot, I’m liking your EasyConsole, I think it’s the nicest console on the asset store. I am having a few issues though with getting it working for me. The console opens fine on OSX, but not on Windows or the web player. Any ideas on what could be causing that? Also I’d like to customize the keys that open and close the console but I didn’t see anything about that in the manual? Is there someplace you could point me at to accomplish this?

Hi Zerot, I purchased this asset last week and It is good but I’d like to see the following improvements added if possible:
1- Ability to access the fields of an object/class. (e.g. GameObject.MeshRenderer.material does not work in your console because it is not a method.). Adding this would really make the console much more useful.
2- Ability to remember previously entered commands by pressing UP ARROW for example.
3- Showing up the list of available fields just like how it shows the available methods.

Thanks.

It should work fine on windows and webplayer. I mainly test on those platforms. maybe it is related to your keys customization request.

To customize the key used, you should edit EasyConsole/FrontEnd/UnityGUI/ConsoleGUI.cs and then change line 268 to use the key you want.
Or, if you use NGui you should edit EasyConsole/FrontEnd/NGUI/ConsoleNGUI.cs and change line 117.

Thanks for using EasyConsole. Regarding your comments:

  1. This is a good idea. I will implement this, but I don’t have a lot of time to spend on this project, so I can’t say when it will be in a release.
  2. This functionality is actually in there, but seems to have broken under unity4. I haven’t found the cause of it yet.
  3. See 1.

Hi, I’m looking to buy this asset and need to know if it works for Flash. Thanks.

Hello Zerot,

Thank you for making EasyConsole. Is was really easy to get it up and running.
I am attempting to write lines of debugging text to your console and can not seem to get the swing of it.

Since Console.Print is not a static function, I assume that I must have to get a reference to the object on my Scene?
I have been able to use find to get that, but then I can’t cast it from a GameObject.

Please help,
Noob Unity coder,
Sean

Update: This turned out to be what was needed…

using UnityEngine;
using Homans.Console;

public static class StaticLoad
{
	public static readonly Console console;

	static StaticLoad ()
	{
		console = GameObject.Find("Console").GetComponent<Console>();
	}
}

public class Util
{
	private static int lineNumber = 0;

	public static void Print(string format, params System.Object [] p)
	{
		StaticLoad.console.Print
		(
			string.Format
			(
				"{0:00000}: {1}",
				lineNumber++,
				string.Format(format, p)
			)
		);
	}
}

Hello Zero,

Thank you for your cool console.

Is there any way to get al the valid commands? In the same way that “help” works.

I want it because I want that Up | Down arrows allow to navigate between valid commands.

Thank you very much