GithubHelp home page GithubHelp logo

gconsole's Introduction

GConsole

GConsole is an ingame developer console for the Unity3D Engine.

Here are some screenshots:

##Why? A proper console solution didn't exist (in my eyes) on the asset store, and I can't live without one. Having a developer console ingame is great for debug purposes, and for your final product too.

See, for instance, Valve's game developer console, which prints information that is otherwise not visible to the user and allows the user to send "advanced" commands, for instance changing a setting.

##Features

  • GUI framework agnostic
  • Easy to use
  • Drag 'n' drop "installation"
  • Suggestions feature
  • Hooks into Unity logger (if you want it to), including stacktraces.
  • Customizable, supports colored text
  • Free and open source!

##UI

###Available UI Front-ends:

##Usage ###Setup

  • Download this repository, put the GConsole folder somewhere in your project.

  • Pop a GConsole script on any (enabled) GameObject in your scene (or drop in the provided prefab).

  • Download a frontend.

  • See frontend page for further steps.

###Printing to the console.

GConsole.Print("Hello world");

###Adding a command

GConsole.AddCommand("quit", "Quits the application.", QuitApplication);
  • The first argument is the command name
  • The second argument is a description
  • The third argument is a method which returns a string and takes one parameter: a string. It doesn't matter whether it's private, internal, protected or public. What this method returns is what is printed to the console.
  • (OPTIONAL) Fourth argument is additional help text. Shown when the user types help <commandname>.

Full Example

public class GConsoleQuit : MonoBehaviour {

	void Start () {
	    GConsole.AddCommand("quit", "Quits the application.", QuitApplication);
	}

    string QuitApplication(string param)
    {
        if (Application.isWebPlayer || Application.isEditor)
        {
            return "You can't quit in a webplayer build, just close this window!"; //Or in the editor, but lets not print that.
        }
        else
        {
            Application.Quit();
            return null; //No point in returning a message if the application has already shut down.
        }
    }
}

###Dynamically calling a command If for some reason you want to call a command dynamically (from code, perhaps from some sort of script file), you can do that.

GUIConsole.Eval(cmd);

Where cmd is a string, just like the user would have typed it into the console.

This returns the output of this command (useful if you want people to be able to use console commands from say, a chat window, where if they prepend a "/" it's evaluated by the console, and then you print what this returns in that window).

##Contribution Guidelines Any contributions are welcome, including feature requests.

##Contributors Rahazan (Guido Zuidhof) TarasOsiris (Taras Leskiv) MuNgLo baguwka

##License

MIT license

gconsole's People

Contributors

baguwka avatar gzuidhof avatar munglo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gconsole's Issues

Incorrect Version of NGUI?

What version of NGUI is this built with? I'm using 2.6.1e.

Assets/GConsole/UI/NGUI/GConsoleNGUI.cs(32,28): error CS1061: 
Type `UIInput' does not contain a definition for `value' and no extension method `value' of 
type `UIInput' could be found (are you missing a using directive or an assembly reference?)

Colourencoding on Unity Log not turning off

I'm making a UI for OpenGUI but even when turning of the use of colourcoding it keeps using colourcodes in log entrys from Unity. I think it used it for exceptions and warnings to. But it is turned of for the suggestions and help list feedback.
Is it something I missed of is it an oversight in GConsole?

uGUI Example

Can you share a uGUI implementation? (4.6 gui)

OpenGUI files

So I am done with getting it working enough as to submit it. But the structure of the repository makes me wonder where you want it submitted.

Only file outside the UI files I had to tweak a line in was GConsoleUIBindings.cs

Line 15

if (Input.GetKeyDown (consoleOpenKey)) // && !UICamera.inputHasFocus)

OpenGUI doesn't have any UICamera stuff.

Other then that I just made a /GConsole/UI/OpenGUI folder with 2 .cs one prefab and a readme. How do you want it submitted?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.