Example #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Example #2
0
 void Start()
 {
     buttonRenderer          = GetComponent <Renderer>();
     buttonsTexture          = FindObjectOfType <ButtonsTexture>().GetInstance();
     buttonRenderer.material = buttonsTexture.materials[index];
 }