Last active
March 16, 2017 09:37
-
-
Save st0326s/d6adf6486904d907acd3f54d5af10215 to your computer and use it in GitHub Desktop.
UniWebView2使い方 メモ ref: http://qiita.com/satotin/items/e38ea1b646bce004598e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webView = ゲームオブジェクト.GetComponent<UniWebView>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webView = ゲームオブジェクト.AddComponent<UniWebView>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webView.OnLoadComplete += (view, success, errorMessage) => { | |
if (success) { | |
フラグとかメソッドを呼んで完了を知らせる; | |
} else { | |
エラー処理 | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webView.OnWebViewShouldClose += (view) => | |
{ | |
webView.Hide(fade, (UniWebViewTransitionEdge)transitionEdge, 0.4f, ()=>{ | |
クローズしたときの処理を書く | |
}); | |
webView.HideToolBar(true); | |
return false; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_webView.Load(URL文字列); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_webView.Show(fade, (UniWebViewTransitionEdge)transitionEdge, 0.4f, ()=> | |
{ | |
表示完了時の処理 | |
}); | |
_webView.ShowToolBar(true); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webView.backButtonEnable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webView.OnReceivedKeyCode += (view, keycode) => | |
{ | |
if(keycode == keyCodeBack) | |
{ | |
_webView.Hide(fade, (UniWebViewTransitionEdge)transitionEdge, 0.4f, () => | |
{ | |
}); | |
_webView.HideToolBar(true); | |
} | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_webView.insets = new UniWebViewEdgeInsets(_insets.top, _insets.left, _insets.bottom, _insets.right); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment