Unity UI: Click Me? Click You!
To prevent UI clicks from filtering down to other objects: using UnityEngine.EventSystems; if (EventSystem.current.IsPointerOverGameObject ()) return; // Check if on a UI Object, if so ignore
To prevent UI clicks from filtering down to other objects: using UnityEngine.EventSystems; if (EventSystem.current.IsPointerOverGameObject ()) return; // Check if on a UI Object, if so ignore
To change an object’s texture ‘runtime’ via code: public Texture theTexture; gameObject.GetComponent<Renderer> ().material.SetTexture (“_MainTex”, theTexture);