Mobile-friendly debug console!
It is simple, but has all the necessary elements.
Check and copy logs generated on the actual machine.
You can define your own debug methods, and enter and execute them.
You only need to enter a few characters of the method name, and you can comfortably use AUTOCOMPLETE to enter the name!!
Checked by iOS, Android.
(On Android, due to Unity's limitations, you need to close the keyboard and then select ui buttons.)
Of course, it can also be used with Editor, Windows, and Mac.
You can start it with the tilde key, and the Tab key, up and down keys, etc. also work like a common console.
- Package Manager
- Import AnKuchen
https://github.com/kyubuns/AnKuchen.git?path=Unity/Assets/AnKuchen
- Import AbcConsole
https://github.com/kyubuns/AbcConsole.git?path=Assets/AbcConsole
- Import AnKuchen
Place the AbcConsole GameObject in your first scene from the menu Assets > Create > AbcConsole.
You can open the AbcConsole in the upper left button.
All you have to do is define the method with the AbcCommand Attribute.
Primitive types can be used as arguments.
public static class OriginalCommand
{
[AbcCommand("Show App Version")]
public static void AppVersion()
{
Debug.Log($"AppVersion is {Application.version}");
}
[AbcCommand("Message To DebugLog")]
public static void Echo(string message)
{
Debug.Log(message);
}
}
The FPS Counter is included in AbcConsole.
You can view it by typing [FpsCounter] in the Console.
In an environment where FrameTimingManager is enabled, more detailed information will be displayed.
You can change AbcConsole GameObject.
My recommendation is to make the color of AbcConsole/Canvas/TriggerButton/Base transparent.
Delete AbcConsole GameObject.
Or, Instantiate only when necessary, as follows. (Recommend)
[Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")]
private void CreateAbcConsoleForDebug()
{
Instantiate(abcConsolePrefab);
}
Disable AbcConsole/Canvas/TriggerButton Object.
You can also use the OnClickTriggerButton method of the Root Component (which AbcConsole has).
- Requires Unity2019.4 or later
MIT License (see LICENSE)
- nkjzm/UnityMobileKeyboardSample