Skip to content

Commit

Permalink
Merge pull request #216 from morikatron/develop
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
MrkKSen authored Aug 24, 2021
2 parents 0c24173 + 806f926 commit 6c81971
Show file tree
Hide file tree
Showing 184 changed files with 8,341 additions and 36 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/morikatron/toio-sdk-for-unity/tree/develop)

## [1.3.1](https://github.com/morikatron/toio-sdk-for-unity/tree/v1.3.1) - 2021-08-24

### Added

- [Docs] English documents added.

### Changed

- [Simulator] Camera used by `CubeInteraction` can be assigned from inspector.
(THANKS to contribution from [**zurachu**](https://github.com/zurachu))

### Fixed

- [Simulator] Behaviour of sloped simualtion fixed. The same as real cube, sloped is now set false when cube is upside-down.
- [CubeReal] Add delay after `StartNotifications` at initialization, which otherwise may fail.

## [1.3.0](https://github.com/morikatron/toio-sdk-for-unity/tree/v1.3.0) - 2021-07-29

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# toio SDK for Unity

> **Switch Language:** `日本語` | [`English`](README_EN.md)
## 概要

**toio SDK for Unity** は、Unity で toio™コア キューブ(以降キューブ)を制御するための開発環境です。
Expand Down
101 changes: 101 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# toio SDK for Unity

> **Switch Language:** [`日本語`](README.md) | `English`
## Overview

**toio SDK for Unity** is a Software Development Kit for controlling toio™ Core Cube (hereafter referred to as Cubes) in Unity.

toio SDK for Unity makes it easy to develop applications that use Cubes. In addition, the simulator function allows you to check the operation of Cube on the screen without using the actual device, so you can develop quickly and efficiently.


<p align="center">
<img src="./docs_EN/res/main/overview.gif" width=720></img>
</p>

<details>
<summary>One of the key features of toio SDK for Unity is that it allows you to run both the simulator and the real Cube with a single source code (click to expand), as shown above. </summary>

```C#
using UnityEngine;
using toio;

public class Hello_Toio : MonoBehaviour
{
CubeManager cubeManager;
Cube cube;

async void Start()
{
// create a cube manager
cubeManager = new CubeManager();
// connect to the nearest cube
cube = await cubeManager.SingleConnect();
}

void Update()
{
// check connection status and order interval
if(cubeManager.IsControllable(cube))
{
cube.Move(100, 70, 200);
// | | `--- duration [ms]
// | `------- right motor speed
// `------------ left motor speed
}
}
}
```

</details>


## Feature list

- Simulator
- Ability to move Cubes in Unity Editor
- Interactive UI like Drag&Drop, force pull, push and etc.
- Multiple official or custom mats can be set
- toio Collection and Standard ID for developers.
- One useful set of mats, lights, and cameras for simulator
- BLE communication module
- Communicate with Cube via iOS app
- Communicating with Cube via Web App
- Communicate with Cube in Android app
- Communicate with Cube when playing in Unity Editor on Mac
- Cube
- One source code to run both simulator and real Cubes in the same way
- Scan, connect, and reconnect Cubes
- CubeHandle (useful movement feature)
- Guide Cube to the target position and angle
- Borders can be restricted to keep Cube from leaving the mat
- Control Cube for a certain distance or angle with a single call
- Navigator (advanced group control)
- Human-like collision avoidance allows multiple cubes to avoid colliding with each other
- Bird-oid allows Cubes to move as a herd
- Collision avoidance and voids can be combined and run simultaneously
- In addition to moving to the target, it can also navigate away from the target.


## Operating Environment

- toio™ Core Cube
- Mat for toio™Core Cube (Play mat included in toio Collection, Simple play mat included in toio™Core Cube (single package), toio play mat for development)
- Mac (macOS ver. 10.14 or higher)
- Windows 10 (64 bit version only)
- iOS devices (iOS ver. 12 or higher)
- Android device (Android OS 9.0 or higher)
- Unity (2019.4.0f1 LTS)


## Documentation

For details on installation, tutorials, sample introductions, and feature explanations, please refer to the following documents.

- ["toio SDK for Unity Documentation"](docs_EN/README.md)

## License

- [LICENSE](LICENSE)
- [Third Party Notices](Third-Party-Notices.md)
- [Intellectual Property Notice](Trademark-Notices_EN.md)
5 changes: 5 additions & 0 deletions Trademark-Notices_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Trademark Notice

"toio™" is a registered trademark or trademark of Sony Interactive Entertainment Inc.

All other product names, service names, company names or logos are trademarks, registered trademarks or trade names of their respective owners.
2 changes: 1 addition & 1 deletion docs/build_ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Unity をインストールする時に iOS Build Support モジュールを追

## ビルドプラットフォームを iOS に切り替え

ここでは、[toio SDK for Unity のインストール](download_sdk.md)の最後から続けて `Assets/toio-sdk-unity/Assets/toio-sdk/Tutorials/1.Basic/0.BasicScene/` を開いているものとして説明を進めます。
ここでは、[toio SDK for Unity のインストール](download_sdk.md)の最後から続けて `Assets/toio-sdk/Tutorials/1.Basic/0.BasicScene/` を開いているものとして説明を進めます。

まず、Unity のメニュー【ファイル】→【ビルド設定...】を選択してください。【Build Settings】の【プラットフォーム】のリストから iOS を選択し、右下の 【Switch Platform】 ボタンを押してください。

Expand Down
2 changes: 1 addition & 1 deletion docs/build_web.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Unity Hub を開いて、[インストール] タブで、相応のバージョ

### ビルドのプラットフォームを WebGL に切り替え

ここでは、[toio SDK for Unity のインストール](download_sdk.md)が完了して`Assets/toio-sdk-unity/Assets/toio-sdk/Samples/Sample_WebGL/Sample_UI/`を開いているものとして進めます。
ここでは、[toio SDK for Unity のインストール](download_sdk.md)が完了して`Assets/toio-sdk/Samples/Sample_WebGL/Sample_UI/`を開いているものとして進めます。

Unity のメニュー【ファイル】→【ビルド設定...】を選択してください。次に【Build Settings】の【プラットフォーム】リストの中、WebGL を選択し、右下の 【Switch Platform】 ボタンを押してください。

Expand Down
Binary file modified docs/res/samples/sensor.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/res/usage_simulator/cube_setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/res/usage_simulator/cube_states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/res/usage_simulator/standardid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/tutorials_UI.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Unity Editor で実行した場合はUIとシミュレータが並列表示さ

1. 「ファイル > 新しいシーン」をクリックして、新しいシーンを作成します。
2. ヒエラルキーにある「Main Camera」と「Directional Light」を削除
3. プロジェクトウィンドウで「Assets/toio-sdk-unity/Assets/toio-sdk/Scripts/Simulator/Resources」フォルダを開きます
3. プロジェクトウィンドウで「Assets/toio-sdk/Scripts/Simulator/Resources」フォルダを開きます
4. 「Cube」Prefab ファイル と 「Stage」Prefab ファイルをヒエラルキーにドラック&ドロップします。<br>
※ シーン上でマウス操作すれば「Cube」オブジェクトの移動も出来ます。
5. ヒエラルキー上で右クリック、右クリックメニューから「空のオブジェクトを作成」をクリックし、「scene」という名前にします。
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

1. 「ファイル > 新しいシーン」をクリックして、新しいシーンを作成します。
2. ヒエラルキー上から「Main Camera」と「Directional Light」を削除
3. プロジェクトウィンドウで「Assets/toio-sdk-unity/Assets/toio-sdk/Scripts/Simulator/Resources」フォルダを開きます。
3. プロジェクトウィンドウで「Assets/toio-sdk/Scripts/Simulator/Resources」フォルダを開きます。
4. 「Cube」Prefabファイルと「Stage」Prefabファイルをヒエラルキーにドラック&ドロップします。<br>
※「シーンビュー」に切り替えてマウス操作すれば「Cube」オブジェクトの移動も出来ます。
5. ヒエラルキー上で右クリック、右クリックメニューから「空のオブジェクトを作成」をクリックし、「scene」という名前にします(※名前は自由です)。
Expand Down
16 changes: 8 additions & 8 deletions docs/usage_simulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ Cube Prefab はシーンの中に複数台配置することが出来ます。
シミュレータ上でリアルに再現するのが難しい、或いは操作しにくい場合、インスペクターでキューブの状態を変更し、対応イベントを起こすことが出来ます。

- `button 状態`チェック入れると、ボタンを押したままの状態になります。押された状態ではキューブは動くことが出来ないので、再びキューブを動かしたい場合にはチェックを外しボタンを放した上にする必要があります。また、マウスの操作でボタン状態を変更した場合、この設定が上書きされます。
- `【sloped の変更を手動で行う`: チェックすると、`sloped 状態` が表示され設定を変更できるようになります。
(通常はシミュレータが毎フレームsloped状態をセットしていますが、この設定が有効な場合はシミュレータがsloped状態をセットしないようになります。)
- `sloped 状態`: キューブが斜面にいるかを示します。
- `衝突を発生`: 衝突を発生させるボタンです。(現在、ゲームエンジンで物理的な衝突シミュレーションは実装されていません)
- `ダブルタップを発生`: ダブルタップを発生させるボタンです。(現在、ゲームエンジンで物理なダブルタップ・シミュレーションは実装されていません)
- `pose 状態`: キューブの姿勢を表示・変更できます。
- `shake レベル`: シェイクの強さを示します。(現在、シミュレータにはキューブがシェイクされたことを検出する機能は実装されていません)
- `button`チェックを入れると、ボタンを押したままの状態になります。押された状態ではキューブは動くことが出来ません。また、マウスの操作でボタン状態を変更した場合、この設定が上書きされます。
- `Change sloped Manually`: チェックすると、`sloped` が表示され設定を変更できるようになります。
(通常はシミュレータが毎フレームsloped状態をセットしていますが、この設定が有効な場合はシミュレータが `sloped` をセットしないようになります。)
- `sloped`: キューブが斜面にいるかを示します。
- `Trigger Collision`: 衝突を発生させるボタンです。(現在、ゲームエンジンで物理的な衝突シミュレーションは実装されていません)
- `Trigger DoubleTap`: ダブルタップを発生させるボタンです。(現在、ゲームエンジンで物理なダブルタップ・シミュレーションは実装されていません)
- `pose`: キューブの姿勢を表示・変更できます。
- `shake level`: シェイクの強さを示します。(現在、シミュレータにはキューブがシェイクされたことを検出する機能は実装されていません)

## 4.2. CubeSimulator の定数

Expand Down
59 changes: 59 additions & 0 deletions docs_EN/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# FAQ

## Table of Contents

- [Basics](FAQ.md#basics)
- [I downloaded toio SDK for Unity, but the samples don't work.](FAQ.md#i-downloaded-toio-sdk-for-unity-but-the-samples-dont-work)

- [Simulator](FAQ.md#simulator)
- [I'm not sure which mats will work best for my development.](FAQ.md#im-not-sure-which-mats-will-work-best-for-my-development)
- [Is the Stage Prefab required?](FAQ.md#is-the-stage-prefab-required)
- [Is there anything I should be aware of if I don't use the Stage Prefab?](FAQ.md#is-there-anything-i-should-be-aware-of-if-i-dont-use-the-stage-prefab)

- [Web application related](FAQ.md#web-application-related)
- [Web apps do not work well on Windows PC](FAQ.md#web-apps-do-not-work-well-on-windows-pc)

## Basics

### I downloaded toio SDK for Unity, but the samples don't work.

If you get the following error message and the program does not work, UniTask may not be installed.

```
Assets\toio-sdk-unity\Assets\toio-sdk\Scripts\Cube\Scanner\NearScanner.cs(54,22): error CS0246: The type or namespace name 'UniTask<>' could not be found (are you missing a using directive or an assembly reference?)
```

To run toio SDK for Unity, you need to install UniTask, see [here](download_sdk.md#install-unitask).

## Simulator

### I'm not sure which mats will work best for my development.
> Keywords: Mat Specifications
The only difference between the various mats is the appearance and the coordinate range. For specifications, please refer to [toio™ Core Cube Technical Specification 2.1.0](https://toio.github.io/toio-spec/docs/info_position_id) and ["Developer's Mat (tentative name)"](https://toio.io/blog/detail/20200423-1.html).

If you simply want to run it in Simulator, it doesn't matr which one you use.<br>
If you want to develop an application that actually runs Cube and not just complete it in Simulator, you should use the same type of mat that you actually use.

Mat class also provides coordinate range, center coordinate, and coordinate transformation functions depending on the selected mat type, so please refer to [document](usage_simulator.md#2-mat-prefab).

### Is the Stage Prefab required?
> Keywords: Stage
It is not required.

As described in [Documentation](usage_simulator.md#5-stage-prefab), the Stage Prefab and Cube Prefab are a set of mats, cameras, components necessary for operation, etc. If you put the Stage Prefab and Cube Prefab into your scene, you can quickly set up a basic development environment.

### Is there anything I should be aware of if I don't use the Stage Prefab?
> Keywords: Stage
Of course, you will not be able to use the Stage's exclusive focus and target pole functions.

You will need to add the EventSystem, etc. needed to operate Cube on your own. For details, please refer to the [Documentation](usage_simulator.md#45-manipulating-cube-objects-cubeinteraction).

## Web application related

### Web apps do not work well on Windows PC
> Keywords: Windows Bluetooth BLE
On Windows PCs, problems have been confirmed with multiple-unit connections. Please check [[here]](build_web.md#unstable-multi-unit-connection-using-windows-pc).
Loading

0 comments on commit 6c81971

Please sign in to comment.