private void ShowWebView() { if (nguiWebView == null) { GameObject go = new GameObject("webView"); nguiWebView = go.AddComponent <NGUIWebView>(); nguiWebView.SetOnLoadComplete(OnLoadComplete); nguiWebView.SetOnClose(OnClose); nguiWebView.SetOnMsg(Message); } nguiWebView.ShowTooBar(true); nguiWebView.SetInsetFormWidget(referenceRect); nguiWebView.Load(input.value); var inset = nguiWebView.webView.insets; label.text = "top:" + inset.top.ToString() + " left :" + inset.left.ToString() + " down :" + inset.bottom.ToString() + " right :" + inset.right.ToString(); }
private void DestoryView() { Destroy(nguiWebView.gameObject); nguiWebView = null; }