Skip to content

Commit

Permalink
added LICENSE.txt and edit README
Browse files Browse the repository at this point in the history
  • Loading branch information
keijiro committed Dec 28, 2011
1 parent bb6e3e8 commit c18d3f1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
17 changes: 17 additions & 0 deletions 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.
14 changes: 13 additions & 1 deletion 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) を参照してください。

0 comments on commit c18d3f1

Please sign in to comment.