Hyluss

[Unity] How to change button highlighted color

Apr 28th, 2018
535
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. [SerializeField] Color chosenMapColor;
  2.  
  3. void ChangeButtonHighlightedColor(Button button)
  4. {
  5.     ColorBlock cb = button.colors;
  6.     cb.highlightedColor = chosenMapColor;
  7.     button.colors = cb;  
  8. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment