Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Copyright (C) 2011 Keijiro Takahashi | ||
|
||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
このプロジェクトは、アプリ内に組み込んだ web view と Unity の間で連携を行う仕組みを検証するものです。 | ||
### 概要 | ||
|
||
Unity iOS および Android において web view 画面内に組み込み、その内部と連携を行うためのプラグインの実装例です。 | ||
|
||
![screenshot](https://github.com/downloads/keijiro/unity-webview-integration/IMG_0004.jpg) | ||
|
||
上は実装されたサンプルシーンです。上部が Unity の画面で、下部が web view です。 Web view 内のリンクをクリックすることにより Unity 画面内にアクションを起こすことができます。 | ||
|
||
### 構成 | ||
|
||
[WebMediator.js](https://github.com/keijiro/unity-webview-integration/blob/master/unity/Assets/Plugins/WebMediator.js) が Unity 側の窓口となるスクリプトです。このスクリプトを通して web view の表示制御、指定 URL のロード、マージンの設定を行うことができます。また、web view 内から送信されたメッセージをここから拾い上げることができます。使用例については [TestInterface.js](https://github.com/keijiro/unity-webview-integration/blob/master/unity/Assets/Scripts/TestInterface.js) を参照してください。 | ||
|
||
Web view 側からメッセージの送信を行うには [unity.js](https://github.com/keijiro/unity-webview-integration/blob/gh-pages/unity.js) を使用する必要があります。詳しい使い方については、テストプロジェクトの [index.html](https://github.com/keijiro/unity-webview-integration/blob/gh-pages/index.html) を参照してください。 |