void OnMouseOver() { //Debug.Log("hover over image"); if (Input.GetMouseButtonDown(1)) { if (sphereButtonEvent != null) { sphereButtonEvent.loadTexture(scene); } else { Debug.Log("sphereButtonEvent is null"); } } }
//load texture public void loadTextureButton() { sphereButtonEvent.loadTexture(textureName.text); }