Skip to content

Provides easy way to create and invoke debug commands in game console (for Unity Player)

License

Notifications You must be signed in to change notification settings

ANU-CHEEKI-BREEKI/com.anupackages.debugconsole

Repository files navigation

com.anupackages.debugconsole

Advanced in-game console for Unity 3D, which replicates Windows cmd.

ATTENTION

This Asset is depends of other repo, which is redistribution of MIT licensed C# options parser NDesk.Options (looks like original repo already missed, but there is original web page)

If you install this asset as package by Unity Package Manager, than packcage com.anupackages.ndesk-options will be installed automatically.

Optional dependency:

  • if you want to use Expression Evaluation, you need to install following packages. Whis are also redistribution for Unity Package Manager usage. See more in How to Install

About

Provides easy way to create and invoke debug commands in game console at runtime. Also it displays console messages (logs, warnings, errors, exceptions, assertions) at runtime in a build.

User interface is created with uGUI and packed in a single SpriteAtlas.

  • Commands, parameters, parameters values autocomplete

  • Persistent commands history

  • It is possible to resize or change UI scale of the console window during the game.

  • Console messages can be filtered by message type the same way as in UnityEditor console window.

  • It is possible to filter logs by search query ste same way as in UnityEditor console window.\

How to Install

  • through Unity Package Manager
    • git url: https://github.com/ANU-CHEEKI-BREEKI/com.anupackages.debugconsole.git
    • npm package: add following to your Scoped Registries
  "scopedRegistries": [
    {
      "name": "ANU",
      "url": "https://registry.npmjs.org/",
      "scopes": [
        "com.anupackages"
      ]
    }
  ]
Screenshot 2023-06-28 at 19 28 06

Then you will be able to search all available packages directly in Unity Package Manager window Screenshot 2023-06-28 at 19 28 52

  • download sources as zip archive and import to your project
  • asset store?

Roadmap

Each star ★ on the project page brings new features closer. You can suggest new features in the Discussions.

How to use

Supported parameter types and some syntax flexibility:

  • string
    • surround with " or '
  • bool (non case sensitive)
    • true: 1, +, yes, y, approve, apply, on
    • false: 0, -, no, n, discard, cancel, off
  • Quaternion
    • parsed as Vector3 euler angles
  • Color32
    • parsed as Color
  • Color
    • parsed as Vector3
    • parsed as Vector4
    • parsed as HtmlString, for example #RGB, #RRGGBBAA, red, cyan, etc..
  • array or list
    • [] or () are equivalented, so below listed samples for [] only
    • , or as component delimiter: [1, 2, 3] or [1 2 3] or [1 , 2 ,3 ] are equivalented
    • [n] or just n witout []: single item n
    • []: empty colection
  • vectors (Vector2Int, Vector2, Vector3Int, Vector3, Vector4)
    • parced as array of fixed size
    • []: all components equals zero
    • [n] or just n witout []: all components equals n
  • GameObject and Component, any type inherited from Component
    • used GameObject.Find and filtered by name for Component types
    • can pass null (non case sensitive)

NCalc

ATTENTION: to use ExpressionEvaluation install package:

original repo: https://github.com/ncalc/ncalc

command line syntax

NDeskOptions + C# optional and named parameters style

commands categories commands list UI and UI commands Infinite scroll

Attributes

InstanceTargetType

Static

Instanced

Direct registration

Custom converters

public ILogger Logger { get; set; }

Custom commandline preprocessors

UI Themes

License

MIT licensed.

About

Provides easy way to create and invoke debug commands in game console (for Unity Player)

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages