mergeInto(LibraryManager.library,
{
OpenWindow:function (str)
{
var ip_addr = "http://" + document.location.hostname + "/" + Pointer_stringify(str);
window.open(ip_addr,'_blank','width=400,height=400,menubar=no,toolbar=no, status=no,scrollbars=yes,location=no,titlebar=no');
}
}
);
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.UI;
public class ButtonOpenPDF : MonoBehaviour
{
public string m_strPDFPath = "StreamingAssets/3DForge_Products.pdf";
private Button m_button;
[DllImport("__Internal")]
private static extern void OpenWindow(string str);
private void Awake()
{
m_button = GetComponent<Button>();
if (m_button != null)
{
m_button.onClick.AddListener(()=>
{
OpenWindow(m_strPDFPath);
});
}
}
}