From c18d3f10bfcb540864cdcc979691415f0c571d6a Mon Sep 17 00:00:00 2001 From: keijiro Date: Wed, 28 Dec 2011 23:46:55 +0900 Subject: [PATCH] added LICENSE.txt and edit README --- LICENSE.txt | 17 +++++++++++++++++ README.md | 14 +++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..98f9e7a --- /dev/null +++ b/LICENSE.txt @@ -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. diff --git a/README.md b/README.md index 2e24cf3..ecd9cbb 100644 --- a/README.md +++ b/README.md @@ -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) を参照してください。