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.
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.
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.
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.
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)
)
);
}
}