@@ -22,6 +22,28 @@ iOS & macOS [Unity Native Plugin](https://docs.unity3d.com/Manual/NativePlugins.
22
22
# Installation
23
23
Download VideoCreator.unitypakcage from [ Releases] ( https://github.com/fuziki/UnityCoreBluetooth/releases ) and install it in your project.
24
24
25
+ ## Set Info.plist
26
+
27
+ Set ** privacy - bluetooth always usage description** in Info.plist.
28
+ You can also set it in PostProcessBuild.
29
+
30
+ ``` c#
31
+ public class PostXcodeBuild
32
+ {
33
+ [PostProcessBuild ]
34
+ public static void SetXcodePlist (BuildTarget buildTarget , string pathToBuiltProject )
35
+ {
36
+ if (buildTarget != BuildTarget .iOS ) return ;
37
+ var plistPath = pathToBuiltProject + " /Info.plist" ;
38
+ var plist = new PlistDocument ();
39
+ plist .ReadFromString (File .ReadAllText (plistPath ));
40
+ var rootDict = plist .root ;
41
+ rootDict .SetString (" NSBluetoothAlwaysUsageDescription" , " use ble" );
42
+ File .WriteAllText (plistPath , plist .WriteToString ());
43
+ }
44
+ }
45
+ ```
46
+
25
47
# Features
26
48
- Peripheral
27
49
- [x] Get name
@@ -39,11 +61,11 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni
39
61
# Usage
40
62
## Example (Get Raw Value from Daydream Controller)
41
63
42
- * SeeMore [ SampleUser.cs] ( Examples/UnityExample/Assets/Scripts/SampleUser.cs )
64
+ SeeMore [ SampleUser.cs] ( Examples/UnityExample/Assets/Scripts/SampleUser.cs )
43
65
44
66
### About Daydream Controller
45
67
46
- * Get raw value form Daydream controller
68
+ Get raw value form Daydream controller
47
69
48
70
| Property | Target |
49
71
| --| --|
@@ -53,7 +75,7 @@ Download VideoCreator.unitypakcage from [Releases](https://github.com/fuziki/Uni
53
75
54
76
### 1. Get CoreBluetoothManager instance
55
77
56
- * Get shared CoreBluetoothManager instance.
78
+ Get shared CoreBluetoothManager instance.
57
79
58
80
``` c#
59
81
manager = CoreBluetoothManager .Shared ;
0 commit comments