Skip to content

Commit 5e94103

Browse files
authored
Readme
1 parent 858e394 commit 5e94103

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# unity-simple-console
2+
[![Unity 2021.3+](https://img.shields.io/badge/unity-2021.3.13+-blue)](https://unity3d.com/get-unity/download)
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://github.com/tayfagames/DateTimeManager/blob/master/LICENSE)
4+
5+
A simple Unity in-game command console.
6+
7+
## Installation
8+
9+
Simply import the .unitypackage file in the [Releases](https://github.com/enisbt/unity-simple-console/releases/) page to your project. Console object is in the `Prefabs` folder.
10+
11+
## Usage
12+
13+
Add the `Simple Console` object in the Prefabs folder to your canvas. Console will be activate/deactivate when you press the `` ` `` key by default. This can change in the Simple Console object.
14+
15+
![Component Setup](https://i.imgur.com/hNK0edq.png)
16+
17+
Add `[ConsoleCommand]` attribute to the functions you want to use in the console.
18+
19+
![Console Command Setup](https://i.imgur.com/IIBuzft.png)
20+
21+
With this set up, `DealDamage` function can be used in the console like this: `DealDamage 15`. This command will substract 15 health from the object.
22+
23+
Functions can have aliases for ease of use in the console.
24+
25+
![Alias Setup](https://i.imgur.com/8Oy3Awv.png)
26+
27+
To invoke `DealDamage` function in the console you need to give `hit 15` command.
28+
29+
## Notes
30+
31+
- Only C# base data types are supported to use as parameters. For more information: https://learn.microsoft.com/en-us/dotnet/api/system.convert?view=net-7.0
32+
- This asset requires `TextMeshPro` to work.
33+
34+
## License
35+
36+
Distributed under the MIT License. See `LICENSE` for more information.

0 commit comments

Comments
 (0)