1
NGUI 3 Support / Onclick URL to a sprite in a scrollview
« on: March 28, 2016, 11:46:36 AM »
Hi,
I have a UI2D sprite in my scrollview that needs to open an URL once triggered with an onclick. Below is the code I generally use but it doesn't seemed to work with NGUI :
I've found another topic about this issue on the forum but the solution provided did not work for me...
Thanks for reading!
EDIT : I got it working through the UIButton component
I have a UI2D sprite in my scrollview that needs to open an URL once triggered with an onclick. Below is the code I generally use but it doesn't seemed to work with NGUI :
- using UnityEngine;
- using System.Collections;
- public class URL : MonoBehaviour {
- void OnMouseDown () {
- Application.OpenURL("http://mywebsite.com");
- }
- }
I've found another topic about this issue on the forum but the solution provided did not work for me...
Thanks for reading!
EDIT : I got it working through the UIButton component

