- Home /
Question by
Teadaddy · Feb 21, 2017 at 04:15 PM ·
scripting problemwebgl
script error in web GL
I would like to understand this error, the strange thing is that it is having trouble with a script that runs fine in another version of the same environment. Any help on understanding what I am looking at here would be helpful, Thanks!
The script(s) in question are -
using UnityEngine;
using UnityEngine.EventSystems;
using System;
using UnityEngine.Events;
public class PressHandler : MonoBehaviour, IPointerDownHandler {
[Serializable]
public class ButtonPressEvent : UnityEvent { }
public ButtonPressEvent OnPress = new ButtonPressEvent();
public void OnPointerDown(PointerEventData eventData) {
OnPress.Invoke ();
}
}
AND-----------------------------------
using UnityEngine;
using System.Runtime.InteropServices;
public class OpenLinkJSPlugin : MonoBehaviour {
public string DocToOpen;
public void OpenLinkJSPlug() {
#if !UNITY_EDITOR
openWindow(DocToOpen);
#endif
}
[DllImport("__Internal")]
private static extern void openWindow (string url);
}
error.jpg
(262.8 kB)
Comment
Best Answer
Answer by Teadaddy · Feb 25, 2017 at 03:14 PM
I did find the answer, so I thought I would post if anyone following or finding this is interested. I was missing a file in my plugins folder setting the path to use the OpenWindow.jslib in my WebGL build.
plugininspector.png
(23.0 kB)
Your answer
Follow this Question
Related Questions
Web GL and Unity editor defferent behaviour 0 Answers
Unity 5.6 webgl script error 4 Answers
WebGL audio and Slider Interaction 0 Answers
Crash in webgl (deploy) 0 Answers