Skip to content

Commit

Permalink
Merge pull request #36 from fuziki/fuziki-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
fuziki authored Jan 22, 2023
2 parents 88bd172 + 7531011 commit c67a392
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 c67a392

Please sign in to comment.