Skip to content

sleepy-wood/client-unity-plugins

Repository files navigation

banner

client-unity-plugins

Contributors Forks Stargazers MIT License

Logo

Unity - Smart Watch & Health Care Integration

Table of Contents
  1. About The Project
  2. Getting Started
  3. License

About The Project

  • 유니티에 API가 없어 직접 native와 연결
  • 유구한 역사와 전통의 make build로 구성
  • C# (Unity) <-> C FFI <-> Swift (iOS)
  • HealthKit -> Health Data
  • HealthKit + CoreMotion + CoreML -> Sleep Detection

Getting Started

1. Build & Push

Build binary

make build

Push binary to dist branch

make push

2. API Usage

TestProject/Assets/Scripts/NativePluginTest.cs 확인

HealthData

using NativePlugin.HealthData;
Functions
  • bool HealthData.IsAvailable()
  • void HealthData.RequestAuth()
  • void HealthData.QuerySleepSamples(DateTime startDate, DateTime endDate, int maxNumSamples)
  • void HealthData.QueryActivitySamples(DateTime startDate, DateTime endDate)
Events
  • event RequestAuthCompletedHandler HealthData.RequestAuthCompleted
  • event QuerySleepSamplesCompletedHandler HealthData.QuerySleepSamplesCompleted
  • event QueryActivitySamplesCompletedHandler HealthData.QueryActivitySamplesCompleted
Delegates
  • delegate void RequestAuthCompletedHandler(bool granted)
  • delegate void QuerySleepSamplesCompletedHandler(SleepSample[] samples)
  • delegate void QueryActivitySamplesCompletedHandler(ActivitySample[] samples)

SleepDetection

using NativePlugin.SleepDetection;
Functions

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

⭐️ Unity + iOS Native Plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •