The OSK DevConsole is a debugging tool for Unity that allows developers to create a debug interface with buttons and labels to display and modify game parameters, even after the game is built.
Version 1.0
- [ConsoleCommand]: Create custom console commands, e.g.,
[ConsoleCommand("cs_quit")]
,[ConsoleCommand("cs_info_system")]
. - [LabelConsole]: Display and modify variable values in the panel.
- [Command Line]: Enter commands like
cs_set_time_scale 60
to modify runtime parameters. - [Auto-Generated UI]: Dynamically creates UI elements from references, supporting generics for flexibility.
- [Category-Based Interface]: Organizes debug elements into categories for better management.
- [Multi-Platform Support]: Works on both Mobile & PC; open the console with the
~
key or a UI button.
- Open Unity Package Manager (
Window
→Package Manager
) and select Add package from git URL:https://github.com/O-S-K/Osk-DevConsole.git
- Press the
~
key to open the console. - Or click the DevTool button in the UI.
[ConsoleCommand("cs_set_fps")]
public void SetFPS(int fps)
{
Application.targetFrameRate = fps;
Debug.Log("FPS set to: " + fps);
}
[ConsoleCommand("cs_set_time_scale")]
public void SetTimeScale(float timeScale)
{
Time.timeScale = timeScale;
}
[ConsoleCommand("cs_quit")]
public void SetQuit()
{
Application.Quit();
}
Type into the console:
cs_set_fps 60
cs_set_time_scale 2
cs_quit
- Supports Unity 2020.3 and later.
- Does not affect the final build if not activated.
MIT License - Free to use and contribute!
If you want to contribute or report issues, create an issue or pull request on GitHub.
- Email: [email protected]
- Facebook: OSK Framework