baba-s / uni-debug-panel

You can display customizable buttons for debugging in the game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

日本語の Readme はこちら

UniDebugPanel

You can display customizable buttons for debugging in the game.

Version

  • Unity 2018.3.9f1

Usage

Symbol

Select "Player Settings ..." from "File> Build Settings ..." on the Unity menu,
Enter "ENABLE_DEBUG_PANEL" in "Scripting Define Symbols".

Basic Usage

Place the "UniDebugPanelUI" prefab in the scene.

using KoganeLib.UniDebugPanel;
using UnityEngine;
using UnityEngine.UI;

public class Example : MonoBehaviour
{
    public UniDebugPanelUI m_debugPanelUI = null;
    public Button          m_buttonUI     = null;

    private void Start()
    {
        m_debugPanelUI.DoSetDisp
        (
            new UDPData( "ロック"    , () => m_buttonUI.interactable = false ),
            new UDPData( "アンロック", () => m_buttonUI.interactable = true  )
        );
        
    }
}

And you create a script like the one above.

You can now call the debugging functions from that scene.

Release Build

Select "Player Settings ..." from "File> Build Settings ..." on the Unity menu,
Deleting "ENABLE_DEBUG_PANEL" from "Scripting Define Symbols"
All functions of UniDebugPanelUI are disabled.

About

You can display customizable buttons for debugging in the game.

License:MIT License


Languages

Language:C# 100.0%