Skip to content

Commit 3ed040e

Browse files
authored
close #10 added can detect method
1 parent 54fef46 commit 3ed040e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Assets/Plugins/DetectHeadset.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@ public class DetectHeadset
88
[DllImport ("__Internal")]
99
static private extern bool _Detect();
1010
#endif
11+
12+
static public bool CanDetect()
13+
{
14+
#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
15+
return true;
16+
#endif
17+
18+
return false;
19+
}
1120

1221
static public bool Detect()
1322
{
14-
#if UNITY_IOS && !UNITY_EDITOR
23+
#if UNITY_IOS && !UNITY_EDITOR
1524
return _Detect();
1625

1726
#elif UNITY_ANDROID && !UNITY_EDITOR

0 commit comments

Comments
 (0)