Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
How to change a UI.Button disabled color on runtime?

I want to change the opacity of my buttons disabled color with code in this exact loop so I was wondering how? Maybe sommething like how I disabled interactability. It should be done to tictactoeSpaces too.

        for(int i = 0; i < tictactoeSpaces.Length; i++)
        {
            tictactoeSpaces[i].interactable = false;
        }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Does it need to be via code?

You actually can configure that in the Inspector of the Button component

enter image description here

If you really need to do it on runtime you can change it via the Button.colors property like e.g.

var button = tictactoeSpaces[i];
var colors = button.colors;
var disabledColor = colors.disabledColor;
disabledColor.a = /*NEWALPHA e.g.*/ 0.2f;
colors.disabledColor = disabledColor;
button.colors = colors;

button.interactable = false;
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda