Tag:Button background color

  • How unity3d changes the background color of a button

    Time:2022-5-3

    I won’t talk more nonsense. Let’s look at the code directly~ using UnityEngine; using System.Collections; public class ButtonStyle : MonoBehaviour { public Color _ color;// Select the background color in the editing environment. The transparency cannot be 0 public Texture2D tex; Void ongui() {GUI. Button (New Rect (0,0100100), “tex”); color oldcolor = GUI. BackgroundColor; // […]