Exemple #1
0
    private void SetupButton(Button button)
    {
        var icon      = button.Query(className: "quicktool-button-icon");
        var iconPath  = "Icons" + button.parent.name + "-icon";
        var iconAsset = Resources.Load <Texture2D>(iconPath);

        button.style.backgroundImage = iconAsset;
        button.clickable.clicked    += () => { };
        button.tooltip = button.parent.name;
    }