1234567891011121314151617181920212223242526272829303132333435 |
- using UnityEngine;
- using System.Collections;
- public class ButtonFix : MonoBehaviour {
- // Use this for initialization
- void Start ()
- {
- var scale = GetComponent<UIButtonScale>();
- if (scale)
- {
- scale.hover = Vector3.one;
- scale.pressed = Vector3.one * 0.95f;
- }
- var color = GetComponent<UIButtonColor>();
- if (color)
- {
- color.hover = new Color(1,1,1,0.8f);
- color.pressed = new Color(1,1,1,1);
- }
- var button = GetComponent<UIButton>();
- if (button)
- {
- button.defaultColor = new Color(1, 1, 1, 0.7f);
- }
- }
-
- // Update is called once per frame
- void Update () {
-
- }
- }
|