Skip to content

AlwaysTooLate Commands module, a simple, universal and easy to use commands solution, that can be used for developer commands, cheats, cvars, etc.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

AlwaysTooLate/AlwaysTooLate.Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlwaysTooLate.Commands

AlwaysTooLate Commands module, a simple, universal and easy to use commands solution, that can be used for developer commands, cheats, cvars, etc.

Installation

Before installing this module, be sure to have installed these:

Open your target project in Unity and use the Unity Package Manager (Window -> Package Manager -> + -> Add package from git URL) and paste the following URL: https://github.com/AlwaysTooLate/AlwaysTooLate.Commands.git

Setup

After succesfull installation, open a scene that is loaded first when starting your game (we recommend having an entry scene called Main that is only used for initializing core systems and utilities, which then loads the next scene, that is supposed to start the game - like a Main Menu). In that scene, create an empty GameObject and attach the CommandsManager component to it.

Basic Usage

To register your own command, use the CommandManager.Instance.RegisterCommand method (it is recommended to register all commands in the Main scene, by using the Awake method on some component in that scene). Example:

using UnityEngine;
using AlwaysTooLate.Commands;

public class TestCommand : MonoBehavior
{
    private void Start()
    {
        CommandManager.Instance.RegisterCommand("hello", "Makes a hello-world-like log", 
         (string name) => Debug.Log($"Hello {name}!"));
    }
}

Contribution

We do accept PR. Feel free to contribute. If you want to find us, look for the ATL staff on the official AlwaysTooLate Discord Server

AlwaysTooLate.Commands (c) 2018-2022 Always Too Late.

About

AlwaysTooLate Commands module, a simple, universal and easy to use commands solution, that can be used for developer commands, cheats, cvars, etc.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages