void Init() { _frameObject = (new GameObject("WebViewObject")).AddComponent <FrameObject>(); _frameObject.Init( cb: (msg) => { Debug.Log(string.Format("CallFromJS[{0}]", msg)); }, err: (msg) => { Debug.Log(string.Format("CallOnError[{0}]", msg)); }, started: (msg) => { Debug.Log(string.Format("CallOnStarted[{0}]", msg)); }, ld: (msg) => { _frameObject.SetVisibility(true); }, enableWKWebView: true, transparent: true); }
void Start() { Init(); if (!string.IsNullOrEmpty(forceUrl)) { _frameObject.LoadURL(forceUrl); } else { _frameObject.LoadURL(IsHybrid ? Uri : Url); } _frameObject.SetVisibility(true); }
void Start() { Init(); if (!string.IsNullOrEmpty(forceUrl)) { _fragementObject.LoadURL(forceUrl); } else { _fragementObject.LoadURL(IsHybrid ? Uri : Url); } _fragementObject.SetMargins(0, 0, 0, 200); _fragementObject.SetVisibility(true); }