Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fuziki committed Jan 22, 2023
1 parent 88bd172 commit 7531011
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ iOS & macOS [Unity Native Plugin](https://docs.unity3d.com/Manual/NativePlugins.
# Installation
Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/UnityCoreBluetooth/releases) and install it in your project.

## Set Info.plist

Set **privacy - bluetooth always usage description** in Info.plist.
You can also set it in PostProcessBuild.

```c#
public class PostXcodeBuild
{
[PostProcessBuild]
public static void SetXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget != BuildTarget.iOS) return;
var plistPath = pathToBuiltProject + "/Info.plist";
var plist = new PlistDocument();
plist.ReadFromString(File.ReadAllText(plistPath));
var rootDict = plist.root;
rootDict.SetString("NSBluetoothAlwaysUsageDescription", "use ble");
File.WriteAllText(plistPath, plist.WriteToString());
}
}
```

# Features
- Peripheral
- [x] Get name
Expand All @@ -39,11 +61,11 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni
# Usage
## Example (Get Raw Value from Daydream Controller)

* SeeMore [SampleUser.cs](Examples/UnityExample/Assets/Scripts/SampleUser.cs)
SeeMore [SampleUser.cs](Examples/UnityExample/Assets/Scripts/SampleUser.cs)

### About Daydream Controller

* Get raw value form Daydream controller
Get raw value form Daydream controller

| Property | Target |
|--|--|
Expand All @@ -53,7 +75,7 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni

### 1. Get CoreBluetoothManager instance

* Get shared CoreBluetoothManager instance.
Get shared CoreBluetoothManager instance.

```c#
manager = CoreBluetoothManager.Shared;
Expand Down

0 comments on commit 7531011

Please sign in to comment.