Command Parser Example
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
This scene demonstrates the use of the Command System. Command system lets you parse string input such as from an in-game chat and trigger paramiterized game events. This system can be used to create console or MMO chat like command systems for player chats, emotes, help systems and more.
What do I learn?
How to use the Command Director
Setting up a Command Library and Commands
How to use both simple and paramiterized commands
How to access the Knowledge Base (where you are now)
How to access the support Discord
How to leave a review ๐
Objects
Example Scripts
The example scripts GameObject implaments the Command Director component which provides easy access to parsing input and exposes a simple Unity Event which will be raised any time a command is found from input.
This GameObject also implaments a simple custom sample script which simply reads input text from the text box and passes it to the Command Director for parsing. The Command Parser Example Script also handles the Command Found event and simply invokes the event as a crude in-game example.
Last updated