Question by
BattleCharge · Apr 22, 2017 at 12:40 PM ·
webglurl
Trigger to open URL in a new tab works in Unity but not WebGL Embed. What's the fix?
This C# (cs) code works when I'm in Unity but not after being built and uploaded to itch.io and embedded.
Here's the code: using UnityEngine; using System.Collections;
public class BestBuy : MonoBehaviour {
void OnTriggerEnter ( Collider myCol) {
if (myCol.gameObject.tag == "Player") {
Debug.Log ("Update time :" + Time.deltaTime);
Application.OpenURL ("http://www.bestbuy.com/");
}
}
}
I downloaded moonsharp with no improvement. Any suggestions?
Comment