private void InitWebView(Rect webViewRect)
{
m_CurrentSkin = EditorGUIUtility.skinIndex;
m_IsDocked = docked;
m_IsOffline = false;
if (!webView)
{
var x = (int)webViewRect.x;
var y = (int)webViewRect.y;
int width = (int)webViewRect.width;
int height = (int)webViewRect.height;
// Create WebView.
webView = ScriptableObject.CreateInstance <WebView>();
webView.InitWebView(m_Parent, x, y, width, height, false);
webView.hideFlags = HideFlags.HideAndDontSave;
webView.AllowRightClickMenu(true);
// Sync focus.
if (hasFocus)
{
SetFocus(true);
}
}
// Direct WebView event callbacks to us.
webView.SetDelegateObject(this);
// Load the A$ startup file.
webView.LoadFile(AssetStoreUtils.GetLoaderPath());
}