├── unity_sdk.gif ├── Samples ├── Materials │ ├── Textures │ │ ├── Ring.png │ │ ├── Watch.png │ │ ├── checker.png │ │ ├── circle.png │ │ ├── HandRight.png │ │ ├── RoundedBox.png │ │ ├── watchFace.png │ │ ├── BatteryEmpty.png │ │ ├── RotaryDial 1.png │ │ ├── bluetoothLogo.png │ │ ├── BatteryFillLevel.png │ │ ├── RoundedBoxFilled.png │ │ ├── Doublepoint_Full_logo_white.png │ │ ├── checker.png.meta │ │ ├── Ring.png.meta │ │ ├── Watch.png.meta │ │ ├── BatteryEmpty.png.meta │ │ ├── HandRight.png.meta │ │ ├── RotaryDial 1.png.meta │ │ ├── bluetoothLogo.png.meta │ │ ├── BatteryFillLevel.png.meta │ │ ├── circle.png.meta │ │ ├── RoundedBox.png.meta │ │ ├── RoundedBoxFilled.png.meta │ │ ├── watchFace.png.meta │ │ └── Doublepoint_Full_logo_white.png.meta │ ├── Textures.meta │ ├── Primary Blue.mat.meta │ ├── White.mat.meta │ ├── Checker.mat.meta │ ├── Light Grey.mat.meta │ ├── LitWhite.mat.meta │ ├── Warnings.mat.meta │ ├── Background Black.mat.meta │ ├── Background Grey.mat.meta │ ├── Primary Blue A85.mat.meta │ ├── Primary Green.mat.meta │ ├── Secondary Blue.mat.meta │ ├── Secondary yellow.mat.meta │ ├── Background Darken.mat.meta │ ├── Background Highlight.mat.meta │ ├── Primary Green.mat │ ├── Primary Blue.mat │ ├── White.mat │ ├── Warnings.mat │ ├── Secondary Blue.mat │ ├── Secondary yellow.mat │ ├── Light Grey.mat │ ├── Primary Blue A85.mat │ ├── Background Darken.mat │ └── Background Highlight.mat ├── Prefabs │ ├── InputManager.prefab.meta │ ├── WatchModel.prefab.meta │ ├── ProbabilityBar.prefab.meta │ ├── VisualisationBlock.prefab.meta │ ├── InputManager.prefab │ └── ProbabilityBar.prefab ├── Scenes.meta ├── Scenes │ └── SampleScene.unity.meta ├── Materials.meta ├── Prefabs.meta ├── Scripts.meta ├── Scripts │ ├── Extras.meta │ ├── ArmUpAngle.cs.meta │ ├── Battery.cs.meta │ ├── DoubleTap.cs.meta │ ├── Drawing.cs.meta │ ├── Gestures.cs.meta │ ├── Gyroscope.cs.meta │ ├── Handedness.cs.meta │ ├── Haptics.cs.meta │ ├── PalmUp.cs.meta │ ├── RotaryDial.cs.meta │ ├── Scrolling.cs.meta │ ├── Slider.cs.meta │ ├── WatchInfo.cs.meta │ ├── Accelerometer.cs.meta │ ├── Orientation.cs.meta │ ├── WatchFaceDial.cs.meta │ ├── WatchFaceTouch.cs.meta │ ├── ConnectionStatus.cs.meta │ ├── Extras │ │ ├── ButtonFlasher.cs.meta │ │ ├── LinePlotter.cs.meta │ │ ├── CameraAdjuster.cs.meta │ │ ├── ButtonFlasher.cs │ │ ├── CameraAdjuster.cs │ │ └── LinePlotter.cs │ ├── ProbabilityGraph.cs.meta │ ├── Slider.cs │ ├── ArmUpAngle.cs │ ├── Battery.cs │ ├── Handedness.cs │ ├── RotaryDial.cs │ ├── WatchFaceDial.cs │ ├── Gestures.cs │ ├── PalmUp.cs │ ├── WatchInfo.cs │ ├── Haptics.cs │ ├── Scrolling.cs │ ├── DoubleTap.cs │ ├── ConnectionStatus.cs │ ├── Orientation.cs │ ├── Gyroscope.cs │ ├── Drawing.cs │ ├── WatchFaceTouch.cs │ ├── Accelerometer.cs │ └── ProbabilityGraph.cs ├── io.port6.watch.examples.watchvis.asmdef.meta └── io.port6.watch.examples.watchvis.asmdef ├── Runtime ├── Client │ ├── Android │ │ ├── touch_sdk-debug.aar │ │ ├── unityandroidbluetoothlelib.jar │ │ ├── HelperActivity.kt.meta │ │ ├── AndroidUnityWrapper.kt.meta │ │ ├── unityandroidbluetoothlelib.jar.meta │ │ ├── HelperActivity.kt │ │ ├── touch_sdk-debug.aar.meta │ │ └── AndroidUnityWrapper.kt │ ├── Thirdparty │ │ ├── BleWinrtDll │ │ │ ├── BleWinrtDll.dll │ │ │ ├── BleApi.cs.meta │ │ │ ├── BleWinrtDll.dll.meta │ │ │ └── BleApi.cs │ │ ├── Protobuf │ │ │ ├── System.Buffers.dll │ │ │ ├── System.Memory.dll │ │ │ ├── Google.Protobuf.dll │ │ │ ├── System.Runtime.CompilerServices.Unsafe.dll │ │ │ ├── Google.Protobuf.dll.meta │ │ │ ├── System.Buffers.dll.meta │ │ │ ├── System.Memory.dll.meta │ │ │ └── System.Runtime.CompilerServices.Unsafe.dll.meta │ │ ├── Protobuf.meta │ │ └── BleWinrtDll.meta │ ├── Android.meta │ ├── Bluetooth.meta │ ├── Proto.meta │ ├── Thirdparty.meta │ ├── io.port6.sdk.client.asmdef.meta │ ├── GattScanner.cs.meta │ ├── LogUtility.cs.meta │ ├── Bluetooth │ │ ├── Gatt.cs.meta │ │ ├── AndroidGatt.cs.meta │ │ ├── DummyGatt.cs.meta │ │ ├── IosGatt.cs.meta │ │ ├── OsxGatt.cs.meta │ │ ├── UwpGatt.cs.meta │ │ ├── WinGatt.cs.meta │ │ ├── BluetoothLEUWP.cs.meta │ │ ├── BluetoothLEW32.cs.meta │ │ ├── BluetoothDeviceScript.cs.meta │ │ └── DummyGatt.cs │ ├── GattConnection.cs.meta │ ├── GattConnector.cs.meta │ ├── GattServices.cs.meta │ ├── Proto │ │ ├── Common.cs.meta │ │ ├── WatchInput.cs.meta │ │ └── WatchOutput.cs.meta │ ├── io.port6.sdk.client.asmdef │ └── GattServices.cs ├── Client.meta ├── io.port6.sdk.asmdef.meta ├── IWatch.cs.meta ├── Watch.cs.meta ├── GattWatchImpl.cs.meta ├── Interaction.cs.meta ├── UwpWatchImpl.cs.meta ├── WatchImpl.cs.meta ├── WatchTracker.cs.meta ├── AndroidWatchImpl.cs.meta ├── MessageDispatcher.cs.meta ├── PythonWatchImpl.cs.meta ├── BluetoothWatchProvider.cs.meta ├── TouchSdkMessageReceiver.cs.meta ├── io.port6.sdk.asmdef ├── TouchSdkMessageReceiver.cs ├── Interaction.cs ├── MessageDispatcher.cs ├── IWatch.cs ├── AndroidWatchImpl.cs └── BluetoothWatchProvider.cs ├── .clang-format ├── LICENSE.meta ├── CHANGELOG.md.meta ├── README.md.meta ├── package.json.meta ├── Editor.meta ├── Runtime.meta ├── Samples.meta ├── Editor ├── io.port6.watch.editor.asmdef.meta ├── BuildGradleModifier.cs.meta ├── AndroidManifestModifier.cs.meta ├── GradlePropertiesModifier.cs.meta ├── io.port6.watch.editor.asmdef ├── GradlePropertiesModifier.cs ├── BuildGradleModifier.cs └── AndroidManifestModifier.cs ├── package.json ├── LICENSE ├── CHANGELOG.md └── README.md /unity_sdk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/unity_sdk.gif -------------------------------------------------------------------------------- /Samples/Materials/Textures/Ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/Ring.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/Watch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/Watch.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/checker.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/circle.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/HandRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/HandRight.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/RoundedBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/RoundedBox.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/watchFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/watchFace.png -------------------------------------------------------------------------------- /Runtime/Client/Android/touch_sdk-debug.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Android/touch_sdk-debug.aar -------------------------------------------------------------------------------- /Samples/Materials/Textures/BatteryEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/BatteryEmpty.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/RotaryDial 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/RotaryDial 1.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/bluetoothLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/bluetoothLogo.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/BatteryFillLevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/BatteryFillLevel.png -------------------------------------------------------------------------------- /Samples/Materials/Textures/RoundedBoxFilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/RoundedBoxFilled.png -------------------------------------------------------------------------------- /Runtime/Client/Android/unityandroidbluetoothlelib.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Android/unityandroidbluetoothlelib.jar -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/BleWinrtDll/BleWinrtDll.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Thirdparty/BleWinrtDll/BleWinrtDll.dll -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Thirdparty/Protobuf/System.Buffers.dll -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Memory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Thirdparty/Protobuf/System.Memory.dll -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Microsoft 3 | AlwaysBreakTemplateDeclarations: 'Yes' 4 | BreakAfterJavaFieldAnnotations: 'true' 5 | NamespaceIndentation: All 6 | 7 | ... 8 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/Google.Protobuf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Thirdparty/Protobuf/Google.Protobuf.dll -------------------------------------------------------------------------------- /Samples/Materials/Textures/Doublepoint_Full_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Samples/Materials/Textures/Doublepoint_Full_logo_white.png -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8c5d2390ff2eda28825cc91b4a8eb3f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11e74f07c0968d64e93828442b2c436a 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8ea48185c76ee44ebc75a377583e9f1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9aabed32271e764db982e62d4737e9b 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fb9a0f20faf2b94cbdf9c21b9ccc306 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5e10c4446623a0458c59ba38dc9ed9b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adbb279cd926c8749b4ede785caebbab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 145dd567d9f59964ca9284ea2fc134da 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doublepointlab/touch-sdk-unity/HEAD/Runtime/Client/Thirdparty/Protobuf/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /Samples/Prefabs/InputManager.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9934ecb904bb7940a886c90c8072bdb 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Prefabs/WatchModel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba48dcbc0222ab34289c947905591e23 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a58c8a0eafb828419732b49d610c7f6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7b2d6c02a914e2478d57bfdad7d0970 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/io.port6.sdk.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ca0789c9323c6342aed3a79bf515ef3 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37a585e0b60c2924cb97446171300267 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 603e7658493465348b51d2d7eba93935 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Prefabs/ProbabilityBar.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d967df9cf5154fe4eb7ae24970afc6d4 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Prefabs/VisualisationBlock.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fb12c4abbfff324cba91c1603dc39e5 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b72e9281f0236bf4eb6e7edbdf3ce2ec 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4dac5f784d2b2f4482959d095efb7d8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b945678d2435fa44b92d3bdaff10149 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/Proto.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdad4e44f76b39597a696e8f41090376 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b81eb5af9214a9a4a97f5bf08f67f012 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/io.port6.watch.editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 755589ed57ec64c4a8961a6cdd209297 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f38f43ab8707f6c408da1601857ee9e0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b86d188be04b034abde4b6f0f8492c0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8bef9ab56b56265586e89a1b0fdeacf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Client/io.port6.sdk.client.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3aae35b309b72464695057c936af7c81 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/BleWinrtDll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c82a0830bb6171b45b3833d05c290f90 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/io.port6.watch.examples.watchvis.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b317c2465d344a4aa23d361333d5f89 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a44060f2c6ed0e54d8b1c1de782609e4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/White.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58605583c53583a44a48b8e643abe8ce 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Checker.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 968b9aebbdf814e44a741d5f3f772623 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Light Grey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdbe5d9f0b948ed41b0fe95d509d9ca2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/LitWhite.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b02beb6f83ee0644b93dbb6a2c60ae4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Warnings.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d473befca046a942b07dd24688d40ae 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Background Black.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24d21a74c9d16d14d9cbc1d72709c762 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Background Grey.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93593542589855d499c1998b9e074ea7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Blue A85.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fef20ac06d051a94dab60245c7702a36 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9cf8cf737a6ee54cbecda606aabd243 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Secondary Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9e17f73abd77bc48b35d85aa08d19b4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Secondary yellow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2716b25ba1bba8641aaf783dde95d456 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Background Darken.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39538e4aa35f27841984393188d57a01 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples/Materials/Background Highlight.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 037bbbd2d0377d149ae8da3d4011d218 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/IWatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7f1273625128c64fadccad8077a2ee1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Watch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53d04aa37511b0a4a8131a729492d28a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/GattWatchImpl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd2b8447d4abd2f73b17ef425192d30d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Interaction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 751d520f87611894bad73669920ea9d0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/UwpWatchImpl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23e06681714c5a9428406655694c4b0a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/WatchImpl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ece9541b259cb6ba86fd35dd7c9a794 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/WatchTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec7c7f1683b75a187870c4d7af277398 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/BuildGradleModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 788b8cb602e02658e9b77ea02c89e745 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/AndroidWatchImpl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e80d078078ed246794fa2c025bfdeb9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/GattScanner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dee3b6a4b7456f408a3ad899426c5e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/LogUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4975aa2c4fbc39448cab04ec9dd0c56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/MessageDispatcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0f158c0d8a67bd4e8e8d10bb1c29498 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/PythonWatchImpl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1b360da073aeafb3a75e6a8af6452b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/ArmUpAngle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30862a01f702e5a4296dc038b0d52206 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Battery.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f39a1e3dcd602845a34905e2bc3a8bb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/DoubleTap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e1ed258c5c72164f927a6d32b9caf17 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Drawing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c98592466846a464698ad5453182669f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Gestures.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad966af9de24f20488b662a391406f24 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Gyroscope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ee1229212fb11347a461d7e5c06364d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Handedness.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 738e00d05dffa6c418618d6592a60555 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Haptics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1a90dfeb2b1b4243a4602a1cccd7c9c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/PalmUp.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 685925503122abe4b8f5b3183f5fef94 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/RotaryDial.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9413637a39eb6984ea15be63c77b0ed9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Scrolling.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 237914d710bd0a74fa6e6375d9bf75cd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Slider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6506d3ad033db744fba0afe6961f67fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/WatchInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5ba617abd0718d4db06cfe98d3065ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AndroidManifestModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c618e3069ec1d8b0bcb36b41548435e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/GradlePropertiesModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11b4d5c8e4c63eb86ace101d6cba9976 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/BluetoothWatchProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1df301ec778228ea6a4a43338c718dea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/Gatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3da23a99e9efca1991ad258990e329b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/GattConnection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c86620a3e26a8a84187bfe0ceb9b7cd1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/GattConnector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c62cee92d6f5c1749a230815b70f2e49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/GattServices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9d6ccf7d0b3411479440e23b52ff59c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Proto/Common.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cd230306668be4ef96809f3fe3202ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Proto/WatchInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ddaa6ade08d1ba8a8d075cd86e5e2f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/TouchSdkMessageReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31c0614312f2a35c39bbfa909e82458f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Accelerometer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03089c8f931ca35449eeb1ef696c47ce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Orientation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 074a69959b1735d42b706dcf8617cc0d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/WatchFaceDial.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13c36c5fd74652e498d701793f80ba00 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/WatchFaceTouch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36899d0bb8fe1ce488f4764b23b219b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/AndroidGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e77bc7bed74665509a5e193e94a6d983 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/DummyGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0225244584ebd36b58270c23c864f6b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/IosGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca42c090c0620435a887d9ce7b647493 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/OsxGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77c26015d1014230b976c740ddbed070 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/UwpGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa0949e702b75305b8c4cc91855febac 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/WinGatt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e0edbe3fb6b39bb9ac7f068c5975f42 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Proto/WatchOutput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2ca06506b2c84d069831d1c8c0a2822 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/ConnectionStatus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57fff9b392f7e6743926e96b62438ba4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/ButtonFlasher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46dcb606a150c964b9ffb72c257b4b2d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/LinePlotter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaad5846f8025cd4a8f37b0967071ff8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/ProbabilityGraph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 537eba860b1a2c544b2d964d4ff40ae2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/BluetoothLEUWP.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82b1d8dd495babf8896f2d8224c3decb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/BluetoothLEW32.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad9848248bee03d4080135494646a068 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/CameraAdjuster.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fb299349870e8c4bb4a5248998dd433 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/BluetoothDeviceScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bec81359043e55409ca7382d2d7cbd1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/BleWinrtDll/BleApi.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccf7d6a32c4b25e4fb0c0274355f632c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Client/io.port6.sdk.client.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Psix.Sdk.Client", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Runtime/io.port6.sdk.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Psix.Sdk", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:3aae35b309b72464695057c936af7c81" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Editor/io.port6.watch.editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Psix.Watch.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:d1502596da9f12c4ead8bb8b8542bdc8" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } 19 | -------------------------------------------------------------------------------- /Samples/io.port6.watch.examples.watchvis.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Psix.Examples.Watchvis", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:9ca0789c9323c6342aed3a79bf515ef3", 6 | "GUID:6055be8ebefd69e48b49212b09b47b2f" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /Samples/Scripts/Slider.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Psix.Examples 6 | { 7 | public class SliderExample : MonoBehaviour 8 | { 9 | [SerializeField] private float sensitivity = 1f; 10 | [SerializeField] private Slider slider; 11 | [SerializeField] private TextMeshPro valueText; 12 | 13 | void Update() 14 | { 15 | slider.value -= Watch.Instance.GravityCorrectedGyroDelta.x * sensitivity * Time.deltaTime; 16 | valueText.text = slider.value.ToString("F1"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/Scripts/ArmUpAngle.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class ArmUpExample : MonoBehaviour 7 | { 8 | [SerializeField] private TextMeshProUGUI text; 9 | [SerializeField] private Transform armPivot; 10 | 11 | private void Update() 12 | { 13 | var gravityAngle = 90 - Mathf.Atan2(-Watch.Instance.Gravity.z, new Vector2(Watch.Instance.Gravity.x, Watch.Instance.Gravity.y).magnitude) * Mathf.Rad2Deg; 14 | armPivot.localEulerAngles = new Vector3(0, 0, gravityAngle); 15 | text.text = gravityAngle.ToString("F1") + "°"; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/BleWinrtDll/BleWinrtDll.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e146edcdc935d1d499d349b5dec0f6e1 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /Samples/Scripts/Battery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using TMPro; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | namespace Psix.Examples 7 | { 8 | public class BatteryExample : MonoBehaviour 9 | { 10 | [SerializeField] private Image batteryFillLevel; 11 | [SerializeField] private TextMeshProUGUI batteryPercentageText; 12 | 13 | private IEnumerator Start() 14 | { 15 | while (true) 16 | { 17 | yield return new WaitForSeconds(1); 18 | batteryFillLevel.fillAmount = (float) Watch.Instance.BatteryPercentage / 100; 19 | batteryPercentageText.text = Watch.Instance.BatteryPercentage + "%"; 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/Scripts/Handedness.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Psix.Interaction; 3 | using TMPro; 4 | using UnityEngine; 5 | 6 | namespace Psix.Examples 7 | { 8 | public class HandednessExample : MonoBehaviour 9 | { 10 | [SerializeField] private Transform handImage; 11 | [SerializeField] private TextMeshProUGUI handednessText; 12 | 13 | private IEnumerator Start() 14 | { 15 | while (true) 16 | { 17 | yield return new WaitForSeconds(1); 18 | handImage.localScale = new Vector3(1, 1, Watch.Instance.Handedness == Hand.Right ? 1 : -1); 19 | handednessText.text = Watch.Instance.Handedness.ToString(); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Runtime/Client/Android/HelperActivity.kt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5de92077680747cfe923b3d8a6c25876 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Android: Android 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Any: 21 | second: 22 | enabled: 0 23 | settings: {} 24 | - first: 25 | Editor: Editor 26 | second: 27 | enabled: 0 28 | settings: 29 | DefaultValueInitialized: true 30 | userData: 31 | assetBundleName: 32 | assetBundleVariant: 33 | -------------------------------------------------------------------------------- /Runtime/Client/Android/AndroidUnityWrapper.kt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0071a3d454a5863a9600028aa275341 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Android: Android 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Any: 21 | second: 22 | enabled: 0 23 | settings: {} 24 | - first: 25 | Editor: Editor 26 | second: 27 | enabled: 0 28 | settings: 29 | DefaultValueInitialized: true 30 | userData: 31 | assetBundleName: 32 | assetBundleVariant: 33 | -------------------------------------------------------------------------------- /Runtime/Client/Android/unityandroidbluetoothlelib.jar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c76cdb74292ea746bccb085ba6c6521 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Android: Android 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Any: 21 | second: 22 | enabled: 0 23 | settings: {} 24 | - first: 25 | Editor: Editor 26 | second: 27 | enabled: 0 28 | settings: 29 | DefaultValueInitialized: true 30 | userData: 31 | assetBundleName: 32 | assetBundleVariant: 33 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/Google.Protobuf.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0908829b3a911bdde9262c00a83be1a8 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 0 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Runtime/TouchSdkMessageReceiver.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | #nullable enable 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | 10 | using UnityEngine; 11 | 12 | 13 | namespace Psix 14 | { 15 | 16 | class TouchSdkMessageReceiver: MonoBehaviour 17 | { 18 | 19 | public event Action? OnMessage = null; 20 | public event Action? OnDisconnect = null; 21 | 22 | 23 | public void OnTouchSdkMessage(string message) 24 | { 25 | OnMessage?.Invoke(System.Convert.FromBase64String(message)); 26 | } 27 | 28 | public void OnTouchSdkDisconnect() { 29 | OnDisconnect?.Invoke(); 30 | } 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "io.port6.sdk", 3 | "displayName": "Touch SDK Unity", 4 | "version": "0.14.0", 5 | "unity": "2022.3", 6 | "description": "C# scripts for bridging Unity applications with Doublepoint enabled smart peripherals.", 7 | "keywords": [ 8 | "Doublepoint", 9 | "Bluetooth", 10 | "Smartwatch", 11 | "Smartphone", 12 | "GATT", 13 | "Bridge", 14 | "BLE" 15 | ], 16 | "license": "", 17 | "author": { 18 | "name": "Doublepoint", 19 | "email": "hello@doublepoint.com", 20 | "url": "https://www.doublepoint.com" 21 | }, 22 | "homepage": "https://www.doublepoint.com", 23 | "samples": [ 24 | { 25 | "displayName": "Watch Visualizer Demo", 26 | "description": "Demonstrate and debug Bridge capabilities", 27 | "path": "Samples~/WatchVisualizerExample" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /Samples/Scripts/RotaryDial.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Psix.Examples 6 | { 7 | public class RotaryDialExample : MonoBehaviour 8 | { 9 | [SerializeField] private Image fillImage; 10 | [SerializeField] private TextMeshProUGUI valueText; 11 | private float dialValue; 12 | 13 | private void Update() 14 | { 15 | dialValue -= Watch.Instance.AngularVelocity.z * Time.deltaTime; 16 | dialValue = Mathf.Clamp01(dialValue); 17 | fillImage.fillAmount = Remap(dialValue, 0, 1, 0.125f, 0.875f); 18 | valueText.text = (dialValue * 100).ToString("F0") + "%"; 19 | } 20 | 21 | private static float Remap(float value, float from1, float to1, float from2, float to2) 22 | { 23 | return (value - from1) / (to1 - from1) * (to2 - from2) + from2; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/Scripts/WatchFaceDial.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | using Interaction; 7 | public class DialVisualizer : MonoBehaviour 8 | { 9 | [SerializeField] private TextMeshPro dialText; 10 | [SerializeField] private Transform dialNorth; 11 | 12 | int position; 13 | 14 | private void OnEnable() 15 | { 16 | Watch.Instance.OnRotary += UpdateDialPosition; 17 | } 18 | 19 | private void OnDisable() 20 | { 21 | Watch.Instance.OnRotary -= UpdateDialPosition; 22 | } 23 | 24 | private void UpdateDialPosition(Direction dir) 25 | { 26 | position += dir == Direction.Clockwise ? -1 : 1; 27 | dialNorth.localEulerAngles = new Vector3(0, 0, position * (360f / 24)); 28 | dialText.text = position.ToString(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/Scripts/Gestures.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | using Interaction; 7 | public class GestureVisualizer : MonoBehaviour 8 | { 9 | [SerializeField] private Gesture gesture; 10 | [SerializeField] private TextMeshPro countText; 11 | [SerializeField] private ButtonFlasher flasher; 12 | private int gestureCount; 13 | 14 | private void OnEnable() 15 | { 16 | Watch.Instance.OnGesture += OnGesture; 17 | } 18 | 19 | private void OnDisable() 20 | { 21 | Watch.Instance.OnGesture -= OnGesture; 22 | } 23 | 24 | private void OnGesture(Gesture newGesture) 25 | { 26 | if (newGesture != gesture) return; 27 | gestureCount++; 28 | countText.text = gestureCount.ToString(); 29 | flasher.FlashButton(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Samples/Scripts/PalmUp.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class PalmUpExample : MonoBehaviour 7 | { 8 | [SerializeField] private TextMeshProUGUI text; 9 | [SerializeField] private TextMeshProUGUI isPalmUpText; 10 | [SerializeField] private Transform watchPivot; 11 | [SerializeField] private float palmUpThreshold = 50f; 12 | 13 | private static float AngleToWorldDown => Vector3.Angle(Vector3.down, Watch.Instance.Gravity.normalized); 14 | private bool IsPalmUp => AngleToWorldDown < palmUpThreshold; 15 | private void Update() 16 | { 17 | var angleToWorldDown = AngleToWorldDown; 18 | watchPivot.localEulerAngles = new Vector3(0, 0, angleToWorldDown); 19 | text.text = angleToWorldDown.ToString("F1") + "°"; 20 | isPalmUpText.text = IsPalmUp ? "Palm Up" : "Palm Down"; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/Scripts/WatchInfo.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class WatchInfo : MonoBehaviour 7 | { 8 | [SerializeField] private TextMeshPro watchInfoText; 9 | 10 | private void OnEnable() 11 | { 12 | Watch.Instance.OnConnect += UpdateInfo; 13 | } 14 | 15 | private void OnDisable() 16 | { 17 | Watch.Instance.OnConnect -= UpdateInfo; 18 | } 19 | 20 | private void UpdateInfo() 21 | { 22 | var info = ""; 23 | info += "Manufacturer: " + Watch.Instance.Manufacturer + "\n"; 24 | info += "Device Name: " + Watch.Instance.DeviceName + "\n"; 25 | info += "App Id: " + Watch.Instance.AppId + "\n"; 26 | info += "App Version: " + Watch.Instance.AppVersion + "\n"; 27 | info += "Model Info: " + Watch.Instance.ModelInfo + "\n"; 28 | 29 | watchInfoText.text = info; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Samples/Scripts/Haptics.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class HapticsExample : MonoBehaviour 7 | { 8 | [SerializeField] private HapticPattern[] hapticPatterns; 9 | 10 | public void StartHapticPattern() 11 | { 12 | StartCoroutine(SendHapticsToWatch()); 13 | } 14 | 15 | private IEnumerator SendHapticsToWatch() 16 | { 17 | for (int i = 0; i < hapticPatterns.Length; i++) 18 | { 19 | Watch.Instance.Vibrate(hapticPatterns[i].duration, hapticPatterns[i].intensity); 20 | yield return new WaitForSeconds((hapticPatterns[i].duration + hapticPatterns[i].delay) / 1000f); 21 | } 22 | } 23 | 24 | [System.Serializable] 25 | public struct HapticPattern 26 | { 27 | public float intensity; 28 | public int duration; 29 | public int delay; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Runtime/Client/GattServices.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Psix 4 | { 5 | public struct Subscription 6 | { 7 | public string service; 8 | public string characteristic; 9 | public Action callback; 10 | public Subscription(string _service, string _characteristic, Action _callback) 11 | { 12 | service = _service; 13 | characteristic = _characteristic; 14 | callback = _callback; 15 | } 16 | } 17 | public static class GattServices 18 | { 19 | public static string ProtobufServiceUUID = "f9d60370-5325-4c64-b874-a68c7c555bad"; 20 | public static string ProtobufOutputUUID = "f9d60371-5325-4c64-b874-a68c7c555bad"; 21 | public static string ProtobufInputUUID = "f9d60372-5325-4c64-b874-a68c7c555bad"; 22 | 23 | public static string InteractionServiceUUID = "008e74d0-7bb3-4ac5-8baf-e5e372cced76"; 24 | 25 | public static string[] RelevantServiceUuids = new[] { ProtobufServiceUUID }; 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Runtime/Interaction.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | using UnityEngine; 5 | 6 | namespace Psix.Interaction 7 | { 8 | public enum Gesture 9 | { 10 | NoGesture = 0, 11 | PinchTap = 1, 12 | Clench = 2, 13 | SurfaceTap = 3, 14 | PinchRelease = 4, 15 | }; 16 | 17 | public enum TouchType 18 | { 19 | None = 0, 20 | Press = 1, 21 | Release = 2, 22 | Move = 3, 23 | }; 24 | 25 | public enum Direction 26 | { 27 | Clockwise = 0, 28 | CounterClockwise = 1, 29 | }; 30 | 31 | public enum Hand 32 | { 33 | None = 0, 34 | Right = 1, 35 | Left = 2 36 | }; 37 | 38 | public struct TouchEvent 39 | { 40 | public TouchEvent(TouchType t, Vector2 c) 41 | { 42 | type = t; 43 | coords = c; 44 | } 45 | 46 | public TouchType type; 47 | public Vector2 coords; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /Editor/GradlePropertiesModifier.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | using System.IO; 5 | using UnityEditor; 6 | 7 | #if UNITY_ANDROID 8 | using UnityEditor.Android; 9 | 10 | /** 11 | * Inserts some properties into the gradle.properties of the gradle project. 12 | */ 13 | internal class GradlePropertiesModifier : IPostGenerateGradleAndroidProject 14 | { 15 | 16 | public void OnPostGenerateGradleAndroidProject(string path) 17 | { 18 | var filepath = Path.Combine(path, "../gradle.properties"); 19 | 20 | var newProperties = "android.useAndroidX=true\nandroid.enableJetifier=true\n"; 21 | 22 | if (File.Exists(filepath)) { 23 | string existing = File.ReadAllText(filepath); 24 | newProperties = string.Concat(newProperties, existing); 25 | } 26 | 27 | System.IO.File.WriteAllText(filepath, newProperties); 28 | 29 | } 30 | 31 | public int callbackOrder { get { return 20002; } } 32 | } 33 | #endif // UNITY_ANDROID 34 | -------------------------------------------------------------------------------- /Runtime/MessageDispatcher.cs: -------------------------------------------------------------------------------- 1 | #nullable enable 2 | 3 | using System; 4 | using System.Collections.Concurrent; 5 | using UnityEngine; 6 | 7 | namespace Psix { 8 | 9 | public class MessageDispatcher : MonoBehaviour 10 | { 11 | 12 | private ConcurrentQueue messageQueue = new ConcurrentQueue(); 13 | 14 | public Action? OnMessage = null; 15 | public Action? OnDisconnect = null; 16 | 17 | private bool shouldDisconnect = false; 18 | 19 | void Update() { 20 | byte[] output; 21 | while (messageQueue.TryDequeue(out output)) { 22 | OnMessage?.Invoke(output); 23 | } 24 | 25 | if (shouldDisconnect) { 26 | OnDisconnect?.Invoke(); 27 | lock(this) shouldDisconnect = false; 28 | } 29 | } 30 | 31 | public void Dispatch(byte[] message) { 32 | messageQueue.Enqueue(message); 33 | } 34 | 35 | public void Disconnect() { 36 | lock(this) shouldDisconnect = true; 37 | } 38 | 39 | } 40 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Doublepoint Technologies Oy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/ButtonFlasher.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Psix.Examples 6 | { 7 | public class ButtonFlasher : MonoBehaviour 8 | { 9 | [SerializeField] private Image imageToFlash; 10 | [SerializeField] private float flashDuration = 0.5f; 11 | private Coroutine currentFx; 12 | 13 | public void FlashButton() 14 | { 15 | if (currentFx != null) StopCoroutine(currentFx); 16 | currentFx = StartCoroutine(FlashFX()); 17 | } 18 | 19 | private IEnumerator FlashFX() 20 | { 21 | const float duration = .5f; 22 | var elapsedTime = 0f; 23 | var currentColor = imageToFlash.color; 24 | while (elapsedTime < duration) 25 | { 26 | elapsedTime += Time.deltaTime; 27 | currentColor.a = Mathf.Lerp(1, 0, elapsedTime/ duration); 28 | imageToFlash.color = currentColor; 29 | yield return null; 30 | } 31 | currentColor.a = 0; 32 | imageToFlash.color = currentColor; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Samples/Scripts/Scrolling.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Psix.Examples 4 | { 5 | public class ScrollingVisualiser : MonoBehaviour 6 | { 7 | private Vector2 velocity; 8 | [SerializeField] private float drag; 9 | [SerializeField] private float velocityMultiplier = 1f; 10 | [SerializeField] private ScrollDirection direction = ScrollDirection.Both; 11 | 12 | private MeshRenderer meshRenderer; 13 | 14 | private void Start() 15 | { 16 | meshRenderer = GetComponent(); 17 | } 18 | 19 | private void Update() 20 | { 21 | velocity += Watch.Instance.GravityCorrectedGyroDelta * Time.deltaTime; 22 | velocity *= 1 - drag * Time.deltaTime; 23 | 24 | if (direction == ScrollDirection.Vertical) 25 | velocity.x = 0; 26 | else if (direction == ScrollDirection.Horizontal) 27 | velocity.y = 0; 28 | 29 | meshRenderer.material.mainTextureOffset += velocity * (velocityMultiplier * Time.deltaTime); 30 | } 31 | } 32 | 33 | public enum ScrollDirection 34 | { 35 | Horizontal, 36 | Vertical, 37 | Both 38 | } 39 | } -------------------------------------------------------------------------------- /Editor/BuildGradleModifier.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | using System.IO; 5 | using UnityEditor; 6 | 7 | #if UNITY_ANDROID 8 | using UnityEditor.Android; 9 | 10 | /** 11 | * Inserts dependencies into build.gradle. 12 | */ 13 | internal class BuildGradleModifier : IPostGenerateGradleAndroidProject 14 | { 15 | 16 | public void OnPostGenerateGradleAndroidProject(string path) 17 | { 18 | var filepath = Path.Combine(path, "build.gradle"); 19 | 20 | if (!File.Exists(filepath)) 21 | return; 22 | 23 | string gradle = File.ReadAllText(filepath); 24 | int insertionIndex = gradle.IndexOf("implementation fileTree"); 25 | 26 | if (insertionIndex < 0) 27 | return; 28 | 29 | gradle = gradle.Insert(insertionIndex, "implementation 'androidx.activity:activity-ktx:1.3.0'\n "); 30 | gradle = gradle.Insert(insertionIndex, "implementation 'com.google.protobuf:protobuf-lite:3.0.0'\n "); 31 | System.IO.File.WriteAllText(filepath, gradle); 32 | 33 | } 34 | 35 | public int callbackOrder { get { return 20001; } } 36 | } 37 | #endif // UNITY_ANDROID 38 | -------------------------------------------------------------------------------- /Samples/Scripts/DoubleTap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TMPro; 3 | using UnityEngine; 4 | 5 | namespace Psix.Examples 6 | { 7 | using Interaction; 8 | 9 | public class DoubleTap : MonoBehaviour 10 | { 11 | [SerializeField] private ButtonFlasher flasher; 12 | [SerializeField] private TextMeshPro countText; 13 | private DateTime lastTapTime; 14 | private const float DoubleTapTime = 0.5f; 15 | private int gestureCount; 16 | private void OnEnable() 17 | { 18 | Watch.Instance.OnGesture += OnGesture; 19 | } 20 | 21 | private void OnDisable() 22 | { 23 | Watch.Instance.OnGesture -= OnGesture; 24 | } 25 | 26 | private void OnGesture(Gesture gesture) 27 | { 28 | if (gesture != Gesture.PinchRelease) 29 | return; 30 | if((DateTime.Now - lastTapTime).TotalSeconds < DoubleTapTime) 31 | OnDoubleTap(); 32 | 33 | lastTapTime = DateTime.Now; 34 | } 35 | private void OnDoubleTap() 36 | { 37 | gestureCount++; 38 | countText.text = gestureCount.ToString(); 39 | flasher.FlashButton(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Samples/Scripts/ConnectionStatus.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class WatchConnectedExample : MonoBehaviour 7 | { 8 | [SerializeField] private Color connectedColor, disconnectedColor; 9 | [SerializeField] private Image bluetoothIcon; 10 | [SerializeField] private GameObject connectWatchPrompt; 11 | 12 | private void OnEnable() 13 | { 14 | Watch.Instance.OnConnect += OnWatchConnected; 15 | Watch.Instance.OnDisconnect += OnWatchDisconnected; 16 | 17 | if (Watch.Instance.Connected) 18 | OnWatchConnected(); 19 | else 20 | OnWatchDisconnected(); 21 | } 22 | 23 | private void OnDisable() 24 | { 25 | Watch.Instance.OnConnect -= OnWatchConnected; 26 | Watch.Instance.OnDisconnect -= OnWatchDisconnected; 27 | } 28 | 29 | private void OnWatchConnected() 30 | { 31 | connectWatchPrompt.SetActive(false); 32 | bluetoothIcon.color = connectedColor; 33 | } 34 | 35 | private void OnWatchDisconnected() 36 | { 37 | connectWatchPrompt.SetActive(true); 38 | bluetoothIcon.color = disconnectedColor; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Runtime/Client/Android/HelperActivity.kt: -------------------------------------------------------------------------------- 1 | package io.port6.android.unitywrapper 2 | 3 | import androidx.activity.ComponentActivity 4 | import android.app.Activity 5 | import android.content.Intent 6 | import android.os.Bundle 7 | 8 | import io.port6.sdk.* 9 | import io.port6.android.unitywrapper.AndroidUnityWrapper 10 | 11 | class HelperActivity: ComponentActivity() { 12 | 13 | override fun onCreate(state: Bundle?) { 14 | super.onCreate(state) 15 | 16 | val useCompanionDeviceMode = intent.getBooleanExtra(EXTRA_USE_COMPANION_DEVICE, false) 17 | 18 | val deviceLauncher = CompanionDeviceHelper.createLauncher(this) { 19 | AndroidUnityWrapper.onDevice(it) 20 | finish() 21 | } 22 | 23 | PermissionHelper.createLauncher(this) { 24 | 25 | // After permissions are granted, request device association 26 | if (useCompanionDeviceMode) { 27 | CompanionDeviceHelper.associate(this, deviceLauncher) 28 | } else { 29 | AndroidUnityWrapper.startScan() 30 | finish() 31 | } 32 | }.also { 33 | PermissionHelper.requestPermissions(it) 34 | } 35 | } 36 | 37 | companion object { 38 | val EXTRA_USE_COMPANION_DEVICE = "foobar_use_companion_device" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Samples/Scripts/Orientation.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class OrientationVisualizer : MonoBehaviour 7 | { 8 | [SerializeField] private Transform visualizerObject; 9 | [SerializeField] private TextMeshPro valueX, valueY, valueZ,valueW; 10 | [SerializeField] private LinePlotter plotterX, plotterY, plotterZ, plotterW; 11 | 12 | private void OnEnable() 13 | { 14 | Watch.Instance.OnOrientation += UpdateOrientation; 15 | } 16 | private void OnDisable() 17 | { 18 | Watch.Instance.OnOrientation -= UpdateOrientation; 19 | } 20 | 21 | private void UpdateOrientation(Quaternion currentQuaternion) 22 | { 23 | valueX.text = currentQuaternion.x.ToString("F4"); 24 | valueY.text = currentQuaternion.y.ToString("F4"); 25 | valueZ.text = currentQuaternion.z.ToString("F4"); 26 | valueW.text = currentQuaternion.w.ToString("F4"); 27 | 28 | plotterX.AddPoint(currentQuaternion.x, -1, 1); 29 | plotterY.AddPoint(currentQuaternion.y, -1, 1); 30 | plotterZ.AddPoint(currentQuaternion.z, -1, 1); 31 | plotterW.AddPoint(currentQuaternion.w, -1, 1); 32 | 33 | visualizerObject.rotation = currentQuaternion; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Primary Green 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 2100000, guid: 6d473befca046a942b07dd24688d40ae, type: 2} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: -1 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: [] 39 | m_Ints: [] 40 | m_Floats: [] 41 | m_Colors: 42 | - _Color: {r: 0.7803922, g: 0.93333334, b: 0.4509804, a: 1} 43 | m_BuildTextureStacks: [] 44 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Primary Blue 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 2100000, guid: 6d473befca046a942b07dd24688d40ae, type: 2} 26 | m_ModifiedSerializedProperties: 16 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 5000 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: [] 39 | m_Ints: [] 40 | m_Floats: [] 41 | m_Colors: 42 | - _Color: {r: 0.5803922, g: 0.9450981, b: 0.92549026, a: 1} 43 | m_BuildTextureStacks: [] 44 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.14.0 4 | 5 | Updated the sample scene to new version. 6 | Fixed code example. 7 | 8 | ## 0.13.1 9 | 10 | Improve sample scene. 11 | Fix gesture detection issue. 12 | 13 | ## 0.13.0-beta 14 | 15 | Added touch-sdk-python backend for editor mode bluetooth. 16 | 17 | Fixed gestures for Doublepoint Kit. 18 | 19 | ## 0.10.0-beta 20 | 21 | Added support for receiving stateful pinch gestures. The start and end of a pinch 22 | are designated by a `PinchTap` and `PinchRelease` gestures, respectively. For the 23 | sake of consistency with stateful pinch and pinch events, pinch events are now 24 | emitted as `PinchTap`, followed immediately by `PinchRelease`. 25 | 26 | ## 0.9.0-beta 27 | 28 | Added support to different gesture models including pinch and surface taps. 29 | 30 | ## 0.8.0-beta 31 | 32 | This update improves the versatility and performance of the TouchSDK Unity 33 | public interface. WatchManager has been removed and the functionality moved to 34 | a new MonoBehaviour, Watch, which can be accessed with the static property 35 | Watch.Instance. This enables alternative sources for the watch data. 36 | 37 | The sensors events were changed to basic c# events to increase performance. The 38 | naming scheme was also unified for some events. The sensor values are also 39 | accessible as properties of Watch. 40 | 41 | The connection to a watch is contained in BluetoothWatchProvider. It should be 42 | accessed through the generic interface Watch.Instance. 43 | -------------------------------------------------------------------------------- /Samples/Scripts/Gyroscope.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class GyroscopeVisualizer : MonoBehaviour 7 | { 8 | [SerializeField] private Transform markerX, markerY, markerZ; 9 | [SerializeField] private TextMeshPro textX,textY ,textZ; 10 | [SerializeField] private LinePlotter plotterX, plotterY, plotterZ; 11 | 12 | private void OnEnable() 13 | { 14 | Watch.Instance.OnAngularVelocity += UpdateGyroscope; 15 | } 16 | 17 | private void OnDisable() 18 | { 19 | Watch.Instance.OnAngularVelocity -= UpdateGyroscope; 20 | } 21 | 22 | private void UpdateGyroscope(Vector3 gyro) 23 | { 24 | const float gyroFactor = 20; 25 | 26 | markerX.localEulerAngles = new Vector3(gyro.x * gyroFactor, 0, 0); 27 | markerY.localEulerAngles = new Vector3(0, gyro.y * gyroFactor, 0); 28 | markerZ.localEulerAngles = new Vector3(0, 0, gyro.z * gyroFactor); 29 | 30 | textX.text = gyro.x.ToString("F4"); 31 | textY.text = gyro.y.ToString("F4"); 32 | textZ.text = gyro.z.ToString("F4"); 33 | 34 | const float maxGyro = 20; 35 | plotterX.AddPoint(gyro.x, -maxGyro, maxGyro); 36 | plotterY.AddPoint(gyro.y, -maxGyro, maxGyro); 37 | plotterZ.AddPoint(gyro.z, -maxGyro, maxGyro); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/CameraAdjuster.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Psix.Examples 4 | { 5 | [ExecuteInEditMode] 6 | [RequireComponent(typeof(Camera))] 7 | public class CameraAdjuster : MonoBehaviour 8 | { 9 | [SerializeField] private Canvas worldSpaceCanvas; 10 | private Camera orthoCamera; 11 | 12 | private void Awake() 13 | { 14 | orthoCamera = GetComponent(); 15 | } 16 | 17 | private void Update() 18 | { 19 | AdjustCameraSize(); 20 | } 21 | 22 | private void AdjustCameraSize() 23 | { 24 | if (worldSpaceCanvas == null) 25 | { 26 | Debug.Log("World Space Canvas not assigned."); 27 | return; 28 | } 29 | 30 | var canvasRect = worldSpaceCanvas.GetComponent(); 31 | 32 | var canvasWidth = canvasRect.rect.width * worldSpaceCanvas.transform.localScale.x; 33 | var canvasHeight = canvasRect.rect.height * worldSpaceCanvas.transform.localScale.y; 34 | 35 | var screenAspect = (float) Screen.width / (float) Screen.height; 36 | var canvasAspect = canvasWidth / canvasHeight; 37 | 38 | orthoCamera.orthographicSize = 39 | canvasAspect >= screenAspect ? canvasWidth / screenAspect / 2f : canvasHeight / 2f; 40 | 41 | orthoCamera.transform.position = new Vector3(canvasRect.position.x, canvasRect.position.y, 42 | orthoCamera.transform.position.z); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Runtime/Client/Android/touch_sdk-debug.aar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94c81276ce42fd50784a5cd27ed8f144 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 1 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Android: 0 20 | Exclude Editor: 1 21 | Exclude Linux64: 1 22 | Exclude OSXUniversal: 1 23 | Exclude Win: 1 24 | Exclude Win64: 1 25 | - first: 26 | Android: Android 27 | second: 28 | enabled: 1 29 | settings: 30 | AndroidSharedLibraryType: Executable 31 | CPU: ARMv7 32 | - first: 33 | Any: 34 | second: 35 | enabled: 0 36 | settings: {} 37 | - first: 38 | Editor: Editor 39 | second: 40 | enabled: 0 41 | settings: 42 | CPU: AnyCPU 43 | DefaultValueInitialized: true 44 | OS: AnyOS 45 | - first: 46 | Standalone: Linux64 47 | second: 48 | enabled: 0 49 | settings: 50 | CPU: AnyCPU 51 | - first: 52 | Standalone: OSXUniversal 53 | second: 54 | enabled: 0 55 | settings: 56 | CPU: None 57 | - first: 58 | Standalone: Win 59 | second: 60 | enabled: 0 61 | settings: 62 | CPU: x86 63 | - first: 64 | Standalone: Win64 65 | second: 66 | enabled: 0 67 | settings: 68 | CPU: x86_64 69 | userData: 70 | assetBundleName: 71 | assetBundleVariant: 72 | -------------------------------------------------------------------------------- /Samples/Scripts/Extras/LinePlotter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Psix.Examples 4 | { 5 | [RequireComponent(typeof(LineRenderer))] 6 | [RequireComponent(typeof(RectTransform))] 7 | public class LinePlotter : MonoBehaviour 8 | { 9 | [SerializeField] private int maxPoints = 100; 10 | private LineRenderer lineRenderer; 11 | private float[] values; 12 | private Vector2 plotterSize; 13 | private float xStep; 14 | 15 | private void Start() 16 | { 17 | lineRenderer = GetComponent(); 18 | plotterSize = GetComponent().rect.size; 19 | xStep = plotterSize.x / maxPoints; 20 | values = new float[maxPoints]; 21 | } 22 | 23 | public void AddPoint(float value, float min, float max) 24 | { 25 | value = Mathf.Clamp(value, min, max); 26 | 27 | for (var i = 0; i < values.Length - 1; i++) 28 | { 29 | values[i] = values[i + 1]; 30 | } 31 | 32 | values[^1] = Remap(value, min, max); 33 | 34 | var points = new Vector3[maxPoints]; 35 | for (var i = 0; i < values.Length; i++) 36 | { 37 | points[i] = new Vector3(i * xStep - plotterSize.x / 2, values[i] * plotterSize.y, 0); 38 | } 39 | 40 | lineRenderer.positionCount = maxPoints; 41 | lineRenderer.SetPositions(points); 42 | } 43 | 44 | private static float Remap(float value, float min, float max) 45 | { 46 | return (value - min) / (max - min) - .5f; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Buffers.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdc439ee4eb924c459eabe953cfd4e08 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: 9 | - UNITY_2020 10 | isPreloaded: 0 11 | isOverridable: 1 12 | isExplicitlyReferenced: 0 13 | validateReferences: 1 14 | platformData: 15 | - first: 16 | : Any 17 | second: 18 | enabled: 0 19 | settings: 20 | Exclude Android: 0 21 | Exclude Editor: 0 22 | Exclude Linux64: 0 23 | Exclude OSXUniversal: 0 24 | Exclude Win: 0 25 | Exclude Win64: 0 26 | - first: 27 | Android: Android 28 | second: 29 | enabled: 1 30 | settings: 31 | CPU: ARMv7 32 | - first: 33 | Any: 34 | second: 35 | enabled: 1 36 | settings: {} 37 | - first: 38 | Editor: Editor 39 | second: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | DefaultValueInitialized: true 44 | OS: AnyOS 45 | - first: 46 | Standalone: Linux64 47 | second: 48 | enabled: 1 49 | settings: 50 | CPU: None 51 | - first: 52 | Standalone: OSXUniversal 53 | second: 54 | enabled: 1 55 | settings: 56 | CPU: None 57 | - first: 58 | Standalone: Win 59 | second: 60 | enabled: 1 61 | settings: 62 | CPU: x86 63 | - first: 64 | Standalone: Win64 65 | second: 66 | enabled: 1 67 | settings: 68 | CPU: x86_64 69 | - first: 70 | Windows Store Apps: WindowsStoreApps 71 | second: 72 | enabled: 0 73 | settings: 74 | CPU: AnyCPU 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Memory.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ae74183039ce634ca6328a5ac4e51fc 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: 9 | - UNITY_2020 10 | isPreloaded: 0 11 | isOverridable: 1 12 | isExplicitlyReferenced: 0 13 | validateReferences: 1 14 | platformData: 15 | - first: 16 | : Any 17 | second: 18 | enabled: 0 19 | settings: 20 | Exclude Android: 0 21 | Exclude Editor: 0 22 | Exclude Linux64: 0 23 | Exclude OSXUniversal: 0 24 | Exclude Win: 0 25 | Exclude Win64: 0 26 | - first: 27 | Android: Android 28 | second: 29 | enabled: 1 30 | settings: 31 | CPU: ARMv7 32 | - first: 33 | Any: 34 | second: 35 | enabled: 1 36 | settings: {} 37 | - first: 38 | Editor: Editor 39 | second: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | DefaultValueInitialized: true 44 | OS: AnyOS 45 | - first: 46 | Standalone: Linux64 47 | second: 48 | enabled: 1 49 | settings: 50 | CPU: None 51 | - first: 52 | Standalone: OSXUniversal 53 | second: 54 | enabled: 1 55 | settings: 56 | CPU: None 57 | - first: 58 | Standalone: Win 59 | second: 60 | enabled: 1 61 | settings: 62 | CPU: x86 63 | - first: 64 | Standalone: Win64 65 | second: 66 | enabled: 1 67 | settings: 68 | CPU: x86_64 69 | - first: 70 | Windows Store Apps: WindowsStoreApps 71 | second: 72 | enabled: 0 73 | settings: 74 | CPU: AnyCPU 75 | userData: 76 | assetBundleName: 77 | assetBundleVariant: 78 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/Protobuf/System.Runtime.CompilerServices.Unsafe.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2a5a5ade3e5ca9b98d25acd6ba17d2c 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | : Any 16 | second: 17 | enabled: 0 18 | settings: 19 | Exclude Android: 0 20 | Exclude Editor: 0 21 | Exclude Linux64: 0 22 | Exclude OSXUniversal: 0 23 | Exclude Win: 0 24 | Exclude Win64: 0 25 | - first: 26 | Android: Android 27 | second: 28 | enabled: 1 29 | settings: 30 | CPU: ARMv7 31 | - first: 32 | Any: 33 | second: 34 | enabled: 1 35 | settings: {} 36 | - first: 37 | Editor: Editor 38 | second: 39 | enabled: 1 40 | settings: 41 | CPU: AnyCPU 42 | DefaultValueInitialized: true 43 | OS: AnyOS 44 | - first: 45 | Standalone: Linux64 46 | second: 47 | enabled: 1 48 | settings: 49 | CPU: None 50 | - first: 51 | Standalone: OSXUniversal 52 | second: 53 | enabled: 1 54 | settings: 55 | CPU: None 56 | - first: 57 | Standalone: Win 58 | second: 59 | enabled: 1 60 | settings: 61 | CPU: x86 62 | - first: 63 | Standalone: Win64 64 | second: 65 | enabled: 1 66 | settings: 67 | CPU: x86_64 68 | - first: 69 | Windows Store Apps: WindowsStoreApps 70 | second: 71 | enabled: 0 72 | settings: 73 | CPU: AnyCPU 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Samples/Scripts/Drawing.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Psix.Examples 4 | { 5 | public class DrawingVisualiser : MonoBehaviour 6 | { 7 | private Rect rect; 8 | 9 | [SerializeField] private float velocityMultiplier; 10 | [SerializeField] private Transform tip; 11 | [SerializeField] private TrailRenderer trail; 12 | 13 | private Vector2 tipPosition; 14 | 15 | private void Start() 16 | { 17 | rect = GetComponent().rect; 18 | trail.Clear(); 19 | } 20 | 21 | void Update() 22 | { 23 | UpdateTipPosition(); 24 | } 25 | 26 | private void UpdateTipPosition() 27 | { 28 | tipPosition -= GravityCorrectedGyroDelta * (Time.deltaTime * velocityMultiplier); 29 | tipPosition = ClampPointToLocalRectTransform(tipPosition); 30 | tip.localPosition = tipPosition; 31 | } 32 | 33 | private static Vector2 GravityCorrectedGyroDelta 34 | { 35 | get 36 | { 37 | var angularVelocity = Watch.Instance.AngularVelocity; 38 | var gravityVector = Watch.Instance.Gravity.normalized; 39 | 40 | var deltaY = angularVelocity.x * gravityVector.y - angularVelocity.y * gravityVector.x; 41 | var deltaX = angularVelocity.y * gravityVector.y + angularVelocity.x * gravityVector.x; 42 | 43 | return new Vector2(-deltaX, deltaY); 44 | } 45 | } 46 | 47 | private Vector2 ClampPointToLocalRectTransform(Vector2 localPoint) 48 | { 49 | localPoint.x = Mathf.Clamp(localPoint.x, rect.xMin, rect.xMax); 50 | localPoint.y = Mathf.Clamp(localPoint.y, rect.yMin, rect.yMax); 51 | return localPoint; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Samples/Scripts/WatchFaceTouch.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | using Interaction; 7 | 8 | public class TouchVisualizer : MonoBehaviour 9 | { 10 | [SerializeField] private Renderer touchPoint; 11 | 12 | [SerializeField] private TextMeshPro textX, textY; 13 | 14 | private const int TouchScreenWidth = 480; //resolution of galaxy watch 6 44mm, ideally would be using Screen.width and Screen.height 15 | 16 | private void OnEnable() 17 | { 18 | Watch.Instance.OnTouch += UpdateTouchIndicator; 19 | } 20 | private void OnDisable() 21 | { 22 | Watch.Instance.OnTouch -= UpdateTouchIndicator; 23 | } 24 | 25 | private void UpdateTouchIndicator(TouchEvent args) 26 | { 27 | switch (args.type) 28 | { 29 | case TouchType.Press: 30 | textX.color = Color.white; 31 | textY.color = Color.white; 32 | touchPoint.material.color = Color.white; 33 | goto case TouchType.Move; 34 | case TouchType.Move: 35 | touchPoint.transform.localPosition = new Vector3( RemappedCoord(args.coords.x), -RemappedCoord(args.coords.y), 0); 36 | textX.text = args.coords.x.ToString("F4"); 37 | textY.text = args.coords.y.ToString("F4"); 38 | break; 39 | case TouchType.Release: 40 | textX.color = Color.grey; 41 | textY.color = Color.grey; 42 | touchPoint.material.color = Color.grey; 43 | break; 44 | } 45 | } 46 | 47 | private static float RemappedCoord(float coord) => Mathf.Clamp01(coord / TouchScreenWidth) - .5f; 48 | } 49 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Touch SDK Unity 2 | 3 | ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/doublepointlab/touch-sdk-unity) 4 | ![GitHub](https://img.shields.io/github/license/doublepointlab/touch-sdk-unity) 5 | [![Discord](https://img.shields.io/discord/869474617729875998)](https://chat.doublepoint.com) 6 | 7 | C# scripts for bridging Unity applications with Doublepoint enabled smart peripherals. 8 | 9 | ![Example Image](unity_sdk.gif) 10 | 11 | ## Installation 12 | 13 | ### On disk 14 | 15 | Using the Package Manager window inside unity, select "Add package from disk" and select the `package.json` file in the root of this repository. 16 | 17 | ## Example usage 18 | 19 | 1. Create an empty gameObject 20 | 2. Add the `Watch` script to gameObject (`Runtime/Watch.cs`) 21 | 3. Add the `BluetoothWatchProvider` script to gameObject (`Runtime/BluetoothWatchProvider.cs`) 22 | 4. Create new script and add following code: 23 | 24 | ```csharp 25 | 26 | using UnityEngine; 27 | using Psix.Interaction; 28 | 29 | public class WatchExample : MonoBehaviour 30 | { 31 | public void Start() 32 | { 33 | Watch.Instance.OnGesture += OnGesture; 34 | Watch.Instance.OnAcceleration += OnAcceleration; 35 | Watch.Instance.OnAngularVelocity += OnAngularVelocity; 36 | Watch.Instance.OnGravity += OnGravity; 37 | Watch.Instance.OnOrientation += OnOrientation; 38 | } 39 | 40 | public void OnGesture(Gesture gesture){ 41 | } 42 | 43 | public void OnAcceleration(Vector3 acceleration){ 44 | } 45 | 46 | public void OnAngularVelocity(Vector3 gyro){ 47 | } 48 | 49 | public void OnGravity(Vector3 gravity){ 50 | } 51 | 52 | public void OnOrientation(Quaternion currentQuaternion){ 53 | } 54 | 55 | } 56 | 57 | ``` 58 | 59 | 60 | Copyright (c) 2025 Doublepoint Oy 61 | Licensed under the MIT License. See LICENSE for details. 62 | -------------------------------------------------------------------------------- /Runtime/Client/Bluetooth/DummyGatt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class DummyGatt : Gatt 4 | { 5 | 6 | override public void Log(string message) {} 7 | override public BluetoothDeviceScript Initialize(bool asCentral, bool asPeripheral, Action action, Action errorAction) { return bluetoothDeviceScript; } 8 | override public void DeInitialize(Action action) {} 9 | override public void BluetoothEnable(bool enable) {} 10 | override public void BluetoothScanMode(ScanMode scanMode) {} 11 | override public void BluetoothConnectionPriority(ConnectionPriority connectionPriority) {} 12 | override public void PauseMessages(bool isPaused) {} 13 | override public void RequestMtu(string name, int mtu, Action action) {} 14 | override public void ScanForPeripheralsWithServices(string[] serviceUUIDs, Action action, Action actionAdvertisingInfo = null, bool rssiOnly = false, bool clearPeripheralList = true, int recordType = 0xFF) {} 15 | override public void RetrieveListOfPeripheralsWithServices(string[] serviceUUIDs, Action action) {} 16 | override public void StopScan() {} 17 | override public void DisconnectAll() {} 18 | override public void ConnectToPeripheral(string name, Action connectAction, Action serviceAction, Action characteristicAction, Action disconnectAction = null) {} 19 | override public void DisconnectPeripheral(string name, Action action) {} 20 | override public void ReadCharacteristic(string name, string service, string characteristic, Action action) {} 21 | override public void WriteCharacteristic(string name, string service, string characteristic, byte[] data, int length, bool withResponse, Action action) {} 22 | override public void SubscribeCharacteristic(string name, string service, string characteristic, Action notificationAction, Action action) {} 23 | override public void SubscribeCharacteristicWithDeviceAddress(string name, string service, string characteristic, Action notificationAction, Action action) {} 24 | override public void UnSubscribeCharacteristic(string name, string service, string characteristic, Action action) {} 25 | } 26 | -------------------------------------------------------------------------------- /Samples/Prefabs/InputManager.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6411585231834034575 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1883223731171504083} 12 | - component: {fileID: 8489297237439207975} 13 | - component: {fileID: 2758165506722589392} 14 | m_Layer: 0 15 | m_Name: InputManager 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &1883223731171504083 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 6411585231834034575} 28 | serializedVersion: 2 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 1.0239912, y: 0.62807393, z: 1.2063577} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_ConstrainProportionsScale: 0 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &8489297237439207975 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 6411585231834034575} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: 53d04aa37511b0a4a8131a729492d28a, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | TapCount: 0 49 | ClenchCount: 0 50 | TouchPosition: {x: 0, y: 0} 51 | IsTouched: 0 52 | ButtonPressCount: 0 53 | RotaryPosition: 0 54 | Acceleration: {x: 0, y: 0, z: 0} 55 | AngularVelocity: {x: 0, y: 0, z: 0} 56 | Orientation: {x: 0, y: 0, z: 0, w: 1} 57 | Gravity: {x: 0, y: 0, z: 0} 58 | Handedness: 0 59 | --- !u!114 &2758165506722589392 60 | MonoBehaviour: 61 | m_ObjectHideFlags: 0 62 | m_CorrespondingSourceObject: {fileID: 0} 63 | m_PrefabInstance: {fileID: 0} 64 | m_PrefabAsset: {fileID: 0} 65 | m_GameObject: {fileID: 6411585231834034575} 66 | m_Enabled: 1 67 | m_EditorHideFlags: 0 68 | m_Script: {fileID: 11500000, guid: 1df301ec778228ea6a4a43338c718dea, type: 3} 69 | m_Name: 70 | m_EditorClassIdentifier: 71 | watchName: 72 | enable_python_backend: 1 73 | ConnectOnStart: 1 74 | -------------------------------------------------------------------------------- /Runtime/IWatch.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | #nullable enable 5 | 6 | using Psix.Interaction; 7 | using System; 8 | using System.Collections.Generic; 9 | using UnityEngine; 10 | 11 | namespace Psix 12 | { 13 | /* Interface defining a generic watch. 14 | */ 15 | public interface IWatch 16 | { 17 | event Action OnGesture; 18 | 19 | event Action OnGestureProbability; 20 | 21 | event Action OnTouch; 22 | 23 | event Action OnButton; 24 | 25 | event Action OnRotary; 26 | 27 | event Action OnAcceleration; 28 | 29 | event Action OnAngularVelocity; 30 | 31 | event Action OnOrientation; 32 | 33 | event Action OnGravity; 34 | 35 | event Action OnHandednessChange; 36 | 37 | event Action> OnDetectedGesturesChange; 38 | 39 | event Action OnConnect; 40 | event Action OnDisconnect; 41 | 42 | public int BatteryPercentage { get; } 43 | 44 | public string AppId { get; } 45 | public string AppVersion { get; } 46 | 47 | public string DeviceName { get; } 48 | public string Manufacturer { get; } 49 | public string ModelInfo { get; } 50 | 51 | public Vector2 TouchScreenResolution { get; } 52 | public bool HapticsAvailable { get; } 53 | 54 | public bool Connected { get; } 55 | 56 | /** 57 | * Trigger a one-shot haptic feedback effect on the watch. 58 | * 59 | * @param length The duration of the effect in milliseconds. 60 | * @param amplitude The strength of the effect, between 0.0 and 1.0. 61 | */ 62 | public void Vibrate(int length, float amplitude); 63 | 64 | /** 65 | * Cancel an ongoing haptic effect that was triggered earlier. 66 | */ 67 | public void CancelVibration(); 68 | 69 | public void RequestGestureDetection(Gesture gesture); 70 | 71 | /** 72 | * Connect to the watch running Doublepoint Controller app. 73 | */ 74 | public void Connect(string name = ""); 75 | 76 | /** 77 | * Disconnect a connected watch. 78 | */ 79 | public void Disconnect(); 80 | 81 | // Clears all Action subscriptions 82 | public void ClearSubscriptions(); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Samples/Prefabs/ProbabilityBar.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6823394337807754640 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6590627146216776567} 12 | - component: {fileID: 6604648465222721481} 13 | - component: {fileID: 3177041669256697854} 14 | m_Layer: 5 15 | m_Name: ProbabilityBar 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &6590627146216776567 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 6823394337807754640} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 0.01, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | m_AnchorMin: {x: 1, y: 0} 36 | m_AnchorMax: {x: 1, y: 0} 37 | m_AnchoredPosition: {x: 0, y: 0} 38 | m_SizeDelta: {x: 100, y: 100} 39 | m_Pivot: {x: 1, y: 0} 40 | --- !u!222 &6604648465222721481 41 | CanvasRenderer: 42 | m_ObjectHideFlags: 0 43 | m_CorrespondingSourceObject: {fileID: 0} 44 | m_PrefabInstance: {fileID: 0} 45 | m_PrefabAsset: {fileID: 0} 46 | m_GameObject: {fileID: 6823394337807754640} 47 | m_CullTransparentMesh: 1 48 | --- !u!114 &3177041669256697854 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 6823394337807754640} 55 | m_Enabled: 1 56 | m_EditorHideFlags: 0 57 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 58 | m_Name: 59 | m_EditorClassIdentifier: 60 | m_Material: {fileID: 2100000, guid: a44060f2c6ed0e54d8b1c1de782609e4, type: 2} 61 | m_Color: {r: 1, g: 1, b: 1, a: 1} 62 | m_RaycastTarget: 0 63 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 64 | m_Maskable: 1 65 | m_OnCullStateChanged: 66 | m_PersistentCalls: 67 | m_Calls: [] 68 | m_Sprite: {fileID: 0} 69 | m_Type: 0 70 | m_PreserveAspect: 0 71 | m_FillCenter: 1 72 | m_FillMethod: 4 73 | m_FillAmount: 1 74 | m_FillClockwise: 1 75 | m_FillOrigin: 0 76 | m_UseSpriteMesh: 0 77 | m_PixelsPerUnitMultiplier: 1 78 | -------------------------------------------------------------------------------- /Samples/Scripts/Accelerometer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using TMPro; 3 | 4 | namespace Psix.Examples 5 | { 6 | public class AccelerometerVisualizer : MonoBehaviour 7 | { 8 | [SerializeField] private Transform indicatorX; 9 | [SerializeField] private Transform indicatorY; 10 | [SerializeField] private Transform indicatorZ; 11 | 12 | [SerializeField] private Transform accelerometerVector; 13 | [SerializeField] private Transform accelerometerTip; 14 | 15 | [SerializeField] private TextMeshPro textX; 16 | [SerializeField] private TextMeshPro textY; 17 | [SerializeField] private TextMeshPro textZ; 18 | 19 | [SerializeField] private LinePlotter plotterX, plotterY, plotterZ; 20 | 21 | private const float AccelerationMultiplier = 250f; 22 | 23 | private void OnEnable() 24 | { 25 | Watch.Instance.OnAcceleration += UpdateVisualizer; 26 | } 27 | 28 | private void OnDisable() 29 | { 30 | Watch.Instance.OnAcceleration -= UpdateVisualizer; 31 | } 32 | 33 | 34 | private void UpdateVisualizer(Vector3 acceleration) 35 | { 36 | const float clampDist = .05f; 37 | var accelerationClamped = new Vector3( 38 | Mathf.Clamp(acceleration.x / AccelerationMultiplier, -clampDist, clampDist), 39 | Mathf.Clamp(acceleration.y / AccelerationMultiplier, -clampDist, clampDist), 40 | Mathf.Clamp(acceleration.z / AccelerationMultiplier, -clampDist, clampDist)); 41 | 42 | accelerometerTip.localPosition = accelerationClamped; 43 | 44 | accelerometerVector.localScale = new Vector3(1, 1, Vector3.Distance(accelerometerTip.localPosition, Vector3.zero)); 45 | accelerometerVector.LookAt(accelerometerTip); 46 | 47 | indicatorX.localPosition = new Vector3(0,0, accelerationClamped.x); 48 | indicatorY.localPosition = new Vector3(0,0, accelerationClamped.y); 49 | indicatorZ.localPosition = new Vector3(0,0, accelerationClamped.z); 50 | 51 | textX.text = acceleration.x.ToString("F4"); 52 | textY.text = acceleration.y.ToString("F4"); 53 | textZ.text = acceleration.z.ToString("F4"); 54 | 55 | const float max = 100; 56 | plotterX.AddPoint(acceleration.x, -max, max); 57 | plotterY.AddPoint(acceleration.y, -max, max); 58 | plotterZ.AddPoint(acceleration.z, -max, max); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Runtime/AndroidWatchImpl.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | #nullable enable 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | 10 | using Google.Protobuf; 11 | 12 | using UnityEngine; 13 | 14 | 15 | namespace Psix 16 | { 17 | 18 | using Interaction; 19 | 20 | /** 21 | * Implementation of smartwatch interface using touch-sdk-android. 22 | * Provides methods and callbacks related to connecting to Doublepoint 23 | * Controller smartwatch app. 24 | * Check also IWatch. 25 | */ 26 | [DefaultExecutionOrder(-50)] 27 | class AndroidWatchImpl : WatchImpl 28 | { 29 | 30 | private static PsixLogger logger = new PsixLogger("AndroidWatchImpl"); 31 | 32 | private AndroidJavaObject androidInterface; 33 | 34 | private bool companionDeviceMode = false; 35 | 36 | public AndroidWatchImpl(bool useCompanionDevice = false) { 37 | 38 | #if !UNITY_ANDROID 39 | logger.Warn("AndroidWatchImpl is only supported on Android."); 40 | #endif 41 | 42 | companionDeviceMode = useCompanionDevice; 43 | 44 | // Create a game object which receives messages from the Touch SDK interface. 45 | GameObject receiverGameObject = new GameObject("TouchSdkGameObject"); 46 | TouchSdkMessageReceiver receiver = receiverGameObject.AddComponent(); 47 | 48 | receiver.OnMessage += onData; 49 | receiver.OnDisconnect += disconnectAction; 50 | 51 | androidInterface = new AndroidJavaObject("io.port6.android.unitywrapper.AndroidUnityWrapper"); 52 | } 53 | 54 | private void onData(byte[] data) { 55 | if (!Connected) { 56 | connectAction(); 57 | } 58 | 59 | OnProtobufData(data); 60 | } 61 | 62 | override public void Connect(string name = "") 63 | { 64 | androidInterface.Call("connect", name, companionDeviceMode); 65 | } 66 | 67 | override public void Disconnect() 68 | { 69 | androidInterface.Call("disconnect"); 70 | } 71 | 72 | override public void Vibrate(int length, float amplitude) 73 | { 74 | androidInterface.Call("vibrate", length, amplitude); 75 | } 76 | 77 | override public void CancelVibration() 78 | { 79 | androidInterface.Call("cancelVibration"); 80 | } 81 | 82 | override public void RequestGestureDetection(Gesture gesture) 83 | { 84 | androidInterface.Call("requestGestureDetection", (int)gesture); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Samples/Scripts/ProbabilityGraph.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Psix.Examples 6 | { 7 | public class ProbabilityGraph : MonoBehaviour 8 | { 9 | public GameObject barPrefab; 10 | private Vector3 startPosition; 11 | private float stepDistance; 12 | 13 | private readonly Queue barPool = new(); 14 | [SerializeField] private int totalBars = 300; 15 | [SerializeField] private Material barEven, barOdd; 16 | [SerializeField] private Material barBelowThreshold; 17 | 18 | private int barCount; 19 | private Transform barHolder; 20 | 21 | private void Awake() 22 | { 23 | var width = GetComponent().rect.width; 24 | startPosition = new Vector3(width * .5f, 0, 0); 25 | stepDistance = width / totalBars * .001f; 26 | 27 | barHolder = new GameObject("BarHolder").transform; 28 | barHolder.SetParent(transform); 29 | barHolder.localPosition = new Vector3(0, -50, 0); 30 | barHolder.localScale = Vector3.one; 31 | } 32 | 33 | private void OnEnable() 34 | { 35 | Watch.Instance.OnGestureProbability += SpawnBar; 36 | } 37 | 38 | private void OnDisable() 39 | { 40 | Watch.Instance.OnGestureProbability -= SpawnBar; 41 | } 42 | 43 | private void SpawnBar(float probability) 44 | { 45 | foreach (Transform child in barHolder) 46 | { 47 | if (child.gameObject.activeSelf) 48 | { 49 | child.position = new Vector3(child.position.x - stepDistance, child.position.y, child.position.z); 50 | } 51 | } 52 | 53 | var bar = GetBarFromPool(); 54 | bar.transform.localPosition = startPosition; 55 | bar.transform.localScale = new Vector3(stepDistance * 10, probability, 1); 56 | 57 | var mat = (barCount % 2 == 0) ? barEven : barOdd; 58 | if (probability < .5f) mat = barBelowThreshold; 59 | bar.GetComponent().material = mat; 60 | 61 | bar.SetActive(true); 62 | barCount++; 63 | 64 | CheckForRecycling(); 65 | } 66 | 67 | private void CheckForRecycling() 68 | { 69 | var endPositionX = -startPosition.x; 70 | 71 | foreach (Transform child in barHolder) 72 | { 73 | if (!child.gameObject.activeSelf || !(child.localPosition.x <= endPositionX)) continue; 74 | child.gameObject.SetActive(false); 75 | barPool.Enqueue(child.gameObject); 76 | } 77 | } 78 | 79 | private GameObject GetBarFromPool() 80 | { 81 | if (barPool.Count > 0) 82 | { 83 | return barPool.Dequeue(); 84 | } 85 | 86 | var newBar = Instantiate(barPrefab, barHolder); 87 | newBar.SetActive(false); 88 | return newBar; 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /Runtime/Client/Android/AndroidUnityWrapper.kt: -------------------------------------------------------------------------------- 1 | package io.port6.android.unitywrapper 2 | 3 | import android.app.Activity 4 | import android.content.Intent 5 | import android.content.Context 6 | import android.util.Log 7 | import android.bluetooth.* 8 | import android.bluetooth.le.* 9 | import com.unity3d.player.UnityPlayer 10 | import io.port6.sdk.* 11 | import java.util.Base64 12 | 13 | 14 | object AndroidUnityWrapper { 15 | 16 | private val TAG = "AndroidUnityWrapper" 17 | 18 | private val context: Context get() = UnityPlayer.currentActivity.applicationContext 19 | private val activity: Activity = UnityPlayer.currentActivity 20 | 21 | private val encoder = Base64.getEncoder() 22 | 23 | private var activeWatch: Watch? = null 24 | 25 | private var name: String = "" 26 | 27 | private val watchCallback = object: Watch.WatchCallback() { 28 | 29 | override fun onRawMessage(data: ByteArray) { 30 | val encoded = encoder.encodeToString(data) 31 | UnityPlayer.UnitySendMessage("TouchSdkGameObject", "OnTouchSdkMessage", encoded) 32 | } 33 | 34 | override fun onDisconnect() { 35 | synchronized(this) { 36 | activeWatch = null 37 | } 38 | 39 | UnityPlayer.UnitySendMessage("TouchSdkGameObject", "OnTouchSdkDisconnect", "") 40 | 41 | } 42 | } 43 | 44 | private val watchConnectorCallback = object: WatchConnector.Callback() { 45 | override fun onWatchConnected(watch: Watch) { 46 | synchronized(this) { 47 | if (activeWatch == null) { 48 | Log.d(TAG, "connecting to ${watch.name}") 49 | watch.setListener(watchCallback) 50 | activeWatch = watch 51 | watchConnector.stopScan() 52 | } else { 53 | Log.d(TAG, "already connected to ${activeWatch?.name}, disconnecting ${watch.name}") 54 | watch.disconnect() // make sure we are only connected to one watch 55 | } 56 | } 57 | } 58 | } 59 | 60 | private val watchConnector: WatchConnector = WatchConnector(context, watchConnectorCallback) 61 | 62 | fun onDevice(device: BluetoothDevice) { 63 | watchConnector.connect(device) 64 | } 65 | 66 | fun vibrate(length: Int, amplitude: Float) { 67 | activeWatch?.triggerHaptics(length, amplitude) 68 | } 69 | 70 | fun cancelVibration() { 71 | activeWatch?.triggerHaptics(0, 0f) 72 | } 73 | 74 | fun requestGestureDetection(gesture: Int) { 75 | activeWatch?.requestGestureDetection(gesture) 76 | } 77 | 78 | fun connect(nameFilter: String, useCompanionDeviceMode: Boolean) { 79 | val intent = Intent(activity, HelperActivity::class.java) 80 | name = nameFilter 81 | // Start the helper activity, which will ensure that we have 82 | // the necessary permissions before calling startScan of this object. 83 | activity.startActivity(intent) 84 | } 85 | 86 | fun disconnect() { 87 | watchConnector.stopScan() 88 | watchConnector.disconnectAndWait() 89 | } 90 | 91 | fun startScan() { 92 | watchConnector.startScan(name) 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/checker.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9d93abcc9dff764fb374b90ce76ae5f 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 0 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Editor/AndroidManifestModifier.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | using System.Xml; 5 | using UnityEditor; 6 | 7 | #if UNITY_ANDROID 8 | using UnityEditor.Android; 9 | 10 | /* 11 | * Inserts elements into the AndroidManifest.xml of the app module, such 12 | * as permission and activity declarations. 13 | */ 14 | internal class AndroidManifestModifier : IPostGenerateGradleAndroidProject 15 | { 16 | static readonly string k_AndroidURI = "http://schemas.android.com/apk/res/android"; 17 | static readonly string k_AndroidManifestPath = "/src/main/AndroidManifest.xml"; 18 | 19 | void CreateNameValueElementsInTag(XmlDocument doc, string parentPath, string tag, 20 | string firstName, string firstValue, string secondName = null, string secondValue = null, string thirdName = null, string thirdValue = null) 21 | { 22 | var xmlNodeList = doc.SelectNodes(parentPath + "/" + tag); 23 | 24 | // don't create if the firstValue matches 25 | foreach (XmlNode node in xmlNodeList) 26 | { 27 | foreach (XmlAttribute attrib in node.Attributes) 28 | { 29 | if (attrib.Value == firstValue) 30 | { 31 | return; 32 | } 33 | } 34 | } 35 | 36 | XmlElement childElement = doc.CreateElement(tag); 37 | childElement.SetAttribute(firstName, k_AndroidURI, firstValue); 38 | 39 | if (secondValue != null) 40 | { 41 | childElement.SetAttribute(secondName, k_AndroidURI, secondValue); 42 | } 43 | 44 | if (thirdValue != null) 45 | { 46 | childElement.SetAttribute(thirdName, k_AndroidURI, thirdValue); 47 | } 48 | 49 | var xmlParentNode = doc.SelectSingleNode(parentPath); 50 | 51 | if (xmlParentNode != null) 52 | { 53 | xmlParentNode.AppendChild(childElement); 54 | } 55 | } 56 | 57 | void AppendActivity(XmlDocument doc, string parentPath, string name) 58 | { 59 | var xmlNode = doc.SelectNodes(parentPath + "/application").Item(0); 60 | XmlElement childElement = doc.CreateElement("activity"); 61 | childElement.SetAttribute("name", k_AndroidURI, name); 62 | childElement.SetAttribute("exported", k_AndroidURI, "true"); 63 | xmlNode.AppendChild(childElement); 64 | } 65 | 66 | public void OnPostGenerateGradleAndroidProject(string path) 67 | { 68 | 69 | var manifestPath = path + k_AndroidManifestPath; 70 | var manifestDoc = new XmlDocument(); 71 | manifestDoc.Load(manifestPath); 72 | 73 | string nodePath = "/manifest"; 74 | CreateNameValueElementsInTag(manifestDoc, nodePath, "uses-permission", "name", "android.permission.BLUETOOTH"); 75 | CreateNameValueElementsInTag(manifestDoc, nodePath, "uses-permission", "name", "android.permission.BLUETOOTH_ADMIN"); 76 | CreateNameValueElementsInTag(manifestDoc, nodePath, "uses-permission", "name", "android.permission.ACCESS_FINE_LOCATION"); 77 | CreateNameValueElementsInTag(manifestDoc, nodePath, "uses-feature", "name", "android.hardware.bluetooth_le", "required", "false"); 78 | CreateNameValueElementsInTag(manifestDoc, nodePath, "uses-feature", "name", "android.hardware.top", "required", "false"); 79 | 80 | AppendActivity(manifestDoc, nodePath, "io.port6.android.unitywrapper.HelperActivity"); 81 | 82 | manifestDoc.Save(manifestPath); 83 | } 84 | 85 | public int callbackOrder { get { return 20000; } } 86 | } 87 | #endif // UNITY_ANDROID 88 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/Ring.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c38bea963afd2944f9a134e28df8f935 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/Watch.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28badfbfadc31164687e05f0dae94acb 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/BatteryEmpty.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cf20cfc3f6c2dd48879e68648f70474 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/HandRight.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f4149d895ede814d81d873ae6b90ac1 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 0 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/RotaryDial 1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b564f39ab83f6f4a892025bf296d993 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 0 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/bluetoothLogo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc07aa38cbdb6e7458f0ec9891e9c719 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/BatteryFillLevel.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a927728374d3344492551bfb71a26ba 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 0 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/circle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 082176dfeb3532942bad5f4172cd4bd5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 254, y: 254, z: 254, w: 254} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 1537655665 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/RoundedBox.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1aea0ae94a44d341a1029c6925de64f 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 150, y: 150, z: 150, w: 150} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 1 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 1537655665 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/RoundedBoxFilled.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eab09ee2f72c04449af4b70eb485ebdd 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 12 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 150, y: 150, z: 150, w: 150} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: Android 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | physicsShape: [] 114 | bones: [] 115 | spriteID: 5e97eb03825dee720800000000000000 116 | internalID: 1537655665 117 | vertices: [] 118 | indices: 119 | edges: [] 120 | weights: [] 121 | secondaryTextures: [] 122 | nameFileIdTable: {} 123 | mipmapLimitGroupName: 124 | pSDRemoveMatte: 0 125 | userData: 126 | assetBundleName: 127 | assetBundleVariant: 128 | -------------------------------------------------------------------------------- /Samples/Materials/White.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: White 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3001 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 139 | - _Color: {r: 1, g: 1, b: 1, a: 1} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/watchFace.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ec26cdf4e3bc9844a4679cf6c882165 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: WebGL 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | - serializedVersion: 3 110 | buildTarget: Android 111 | maxTextureSize: 2048 112 | resizeAlgorithm: 0 113 | textureFormat: -1 114 | textureCompression: 1 115 | compressionQuality: 50 116 | crunchedCompression: 0 117 | allowsAlphaSplitting: 0 118 | overridden: 0 119 | ignorePlatformSupport: 0 120 | androidETC2FallbackOverride: 0 121 | forceMaximumCompressionQuality_BC6H_BC7: 0 122 | - serializedVersion: 3 123 | buildTarget: Windows Store Apps 124 | maxTextureSize: 2048 125 | resizeAlgorithm: 0 126 | textureFormat: -1 127 | textureCompression: 1 128 | compressionQuality: 50 129 | crunchedCompression: 0 130 | allowsAlphaSplitting: 0 131 | overridden: 0 132 | ignorePlatformSupport: 0 133 | androidETC2FallbackOverride: 0 134 | forceMaximumCompressionQuality_BC6H_BC7: 0 135 | spriteSheet: 136 | serializedVersion: 2 137 | sprites: [] 138 | outline: [] 139 | physicsShape: [] 140 | bones: [] 141 | spriteID: 5e97eb03825dee720800000000000000 142 | internalID: 0 143 | vertices: [] 144 | indices: 145 | edges: [] 146 | weights: [] 147 | secondaryTextures: [] 148 | nameFileIdTable: {} 149 | mipmapLimitGroupName: 150 | pSDRemoveMatte: 0 151 | userData: 152 | assetBundleName: 153 | assetBundleVariant: 154 | -------------------------------------------------------------------------------- /Samples/Materials/Warnings.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Warnings 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3003 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 139 | - _Color: {r: 0.9333334, g: 0.5686275, b: 0.4509804, a: 1} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Samples/Materials/Secondary Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Secondary Blue 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3003 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 139 | - _Color: {r: 0.5803921, g: 0.65882355, b: 0.9450981, a: 1} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Samples/Materials/Textures/Doublepoint_Full_logo_white.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74f6b0d162ba1df4ea395fabe3db6cf1 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 1 41 | wrapV: 1 42 | wrapW: 0 43 | nPOTScale: 0 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 1 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 8 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 3 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 2048 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 3 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 3 97 | buildTarget: WebGL 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | - serializedVersion: 3 110 | buildTarget: Android 111 | maxTextureSize: 2048 112 | resizeAlgorithm: 0 113 | textureFormat: -1 114 | textureCompression: 1 115 | compressionQuality: 50 116 | crunchedCompression: 0 117 | allowsAlphaSplitting: 0 118 | overridden: 0 119 | ignorePlatformSupport: 0 120 | androidETC2FallbackOverride: 0 121 | forceMaximumCompressionQuality_BC6H_BC7: 0 122 | - serializedVersion: 3 123 | buildTarget: Windows Store Apps 124 | maxTextureSize: 2048 125 | resizeAlgorithm: 0 126 | textureFormat: -1 127 | textureCompression: 1 128 | compressionQuality: 50 129 | crunchedCompression: 0 130 | allowsAlphaSplitting: 0 131 | overridden: 0 132 | ignorePlatformSupport: 0 133 | androidETC2FallbackOverride: 0 134 | forceMaximumCompressionQuality_BC6H_BC7: 0 135 | spriteSheet: 136 | serializedVersion: 2 137 | sprites: [] 138 | outline: [] 139 | physicsShape: [] 140 | bones: [] 141 | spriteID: 5e97eb03825dee720800000000000000 142 | internalID: 0 143 | vertices: [] 144 | indices: 145 | edges: [] 146 | weights: [] 147 | secondaryTextures: [] 148 | nameFileIdTable: {} 149 | mipmapLimitGroupName: 150 | pSDRemoveMatte: 0 151 | userData: 152 | assetBundleName: 153 | assetBundleVariant: 154 | -------------------------------------------------------------------------------- /Samples/Materials/Secondary yellow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Secondary yellow 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3003 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 139 | - _Color: {r: 0.94509804, g: 0.909804, b: 0.5803922, a: 1} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Samples/Materials/Light Grey.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Light Grey 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3002 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 0.24528301, g: 0.24528301, b: 0.24528301, a: 1} 139 | - _Color: {r: 0.39607847, g: 0.40784317, b: 0.4156863, a: 1} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Samples/Materials/Primary Blue A85.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-7425508430084154818 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: -1 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Primary Blue A85 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: -1 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _EmissionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _MainTex: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MetallicGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _OcclusionMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _ParallaxMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _SpecGlossMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - unity_Lightmaps: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_LightmapsInd: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_ShadowMasks: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | m_Ints: [] 96 | m_Floats: 97 | - _AlphaClip: 0 98 | - _AlphaToMask: 0 99 | - _Blend: 0 100 | - _BlendModePreserveSpecular: 1 101 | - _BlendOp: 0 102 | - _BumpScale: 1 103 | - _ColorMask: 15 104 | - _Cull: 2 105 | - _Cutoff: 0.5 106 | - _DetailNormalMapScale: 1 107 | - _DstBlend: 0 108 | - _DstBlendAlpha: 0 109 | - _GlossMapScale: 1 110 | - _Glossiness: 0.5 111 | - _GlossinessSource: 0 112 | - _GlossyReflections: 1 113 | - _Metallic: 0 114 | - _Mode: 0 115 | - _OcclusionStrength: 1 116 | - _Parallax: 0.02 117 | - _QueueOffset: 0 118 | - _ReceiveShadows: 1 119 | - _SampleGI: 0 120 | - _Shininess: 0 121 | - _Smoothness: 0.5 122 | - _SmoothnessSource: 0 123 | - _SmoothnessTextureChannel: 0 124 | - _SpecSource: 0 125 | - _SpecularHighlights: 1 126 | - _SrcBlend: 1 127 | - _SrcBlendAlpha: 1 128 | - _Stencil: 0 129 | - _StencilComp: 8 130 | - _StencilOp: 0 131 | - _StencilReadMask: 255 132 | - _StencilWriteMask: 255 133 | - _Surface: 0 134 | - _UVSec: 0 135 | - _UseUIAlphaClip: 0 136 | - _ZWrite: 1 137 | m_Colors: 138 | - _BaseColor: {r: 0.6037736, g: 0.6037736, b: 0.6037736, a: 1} 139 | - _Color: {r: 0.5803921, g: 0.945098, b: 0.9254902, a: 0.8509804} 140 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 141 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 142 | m_BuildTextureStacks: [] 143 | -------------------------------------------------------------------------------- /Runtime/BluetoothWatchProvider.cs: -------------------------------------------------------------------------------- 1 | /// Copyright (c) 2024 Doublepoint Technologies Oy 2 | /// Licensed under the MIT License. See LICENSE for details. 3 | 4 | #nullable enable 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | 10 | using UnityEngine; 11 | 12 | #if UNITY_ANDROID 13 | using UnityEngine.Android; 14 | #endif 15 | 16 | namespace Psix 17 | { 18 | 19 | using Interaction; 20 | 21 | /** 22 | * MonoBehaviour that instantiates and register the appropriate IWatch implementation. 23 | */ 24 | [DefaultExecutionOrder(-50)] 25 | public class BluetoothWatchProvider : MonoBehaviour 26 | { 27 | [SerializeField] 28 | public string watchName = ""; 29 | 30 | [Tooltip("Use python sdk backend in editor mode.")] 31 | [SerializeField] 32 | private bool enable_python_backend = true; 33 | 34 | public bool ConnectOnStart = true; 35 | 36 | private bool UseAndroidImplementation = true; 37 | 38 | private bool pythonImplActive 39 | { 40 | get { 41 | return enable_python_backend && Application.isEditor; 42 | } 43 | } 44 | private bool androidImplActive 45 | { 46 | get { 47 | return !pythonImplActive && UseAndroidImplementation && Application.platform == RuntimePlatform.Android; 48 | } 49 | } 50 | 51 | private IWatch? watch = null; 52 | 53 | #if UNITY_ANDROID 54 | private bool connectCalledOnStart = false; 55 | private string scanPermission = "android.permission.BLUETOOTH_SCAN"; 56 | private string connectPermission = "android.permission.BLUETOOTH_CONNECT"; 57 | #endif 58 | 59 | private void Awake() 60 | { 61 | #if ENABLE_WINMD_SUPPORT 62 | watch = new UwpWatchImpl(); 63 | #else 64 | if (pythonImplActive) 65 | watch = new PythonWatchImpl(); 66 | else if (androidImplActive) 67 | watch = new AndroidWatchImpl(false); 68 | else 69 | watch = new GattWatchImpl(); 70 | #endif 71 | 72 | Watch.Instance.RegisterProvider(watch!); 73 | } 74 | 75 | private bool CheckPermissions() 76 | { 77 | #if UNITY_ANDROID 78 | var jniClass = AndroidJNI.FindClass("android/os/Build$VERSION"); 79 | var fieldID = AndroidJNI.GetStaticFieldID(jniClass, "SDK_INT", "I"); 80 | var sdkLevel = AndroidJNI.GetStaticIntField(jniClass, fieldID); 81 | 82 | var androidTwelvePermissionsOk = 83 | (sdkLevel < 31) || (Permission.HasUserAuthorizedPermission(scanPermission) && 84 | Permission.HasUserAuthorizedPermission(connectPermission)); 85 | 86 | return (Permission.HasUserAuthorizedPermission(Permission.CoarseLocation) && 87 | Permission.HasUserAuthorizedPermission(Permission.FineLocation) && androidTwelvePermissionsOk); 88 | #else 89 | return true; 90 | #endif 91 | } 92 | 93 | private void RequestPermissions() 94 | { 95 | #if UNITY_ANDROID 96 | Permission.RequestUserPermissions( 97 | new string[] { Permission.CoarseLocation, Permission.FineLocation, scanPermission, connectPermission }); 98 | #endif 99 | } 100 | 101 | private void Start() 102 | { 103 | #if UNITY_ANDROID 104 | if (pythonImplActive) 105 | { 106 | if (ConnectOnStart) 107 | { 108 | watch!.Connect(watchName); 109 | } 110 | } 111 | else 112 | RequestPermissions(); 113 | #else 114 | if (ConnectOnStart) 115 | watch!.Connect(watchName); 116 | #endif 117 | } 118 | 119 | #if UNITY_ANDROID 120 | private void Update() 121 | { 122 | if (!pythonImplActive && (ConnectOnStart && !connectCalledOnStart && CheckPermissions())) 123 | { 124 | connectCalledOnStart = true; 125 | watch!.Connect(watchName); 126 | } 127 | } 128 | #endif 129 | private void OnApplicationQuit() 130 | { 131 | watch?.Disconnect(); 132 | } 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /Runtime/Client/Thirdparty/BleWinrtDll/BleApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | public class BleApi 5 | { 6 | // dll calls 7 | public enum ScanStatus { PROCESSING, AVAILABLE, FINISHED }; 8 | 9 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 10 | public struct DeviceUpdate 11 | { 12 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 13 | public string id; 14 | [MarshalAs(UnmanagedType.I1)] 15 | public bool isConnectable; 16 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 17 | public string name; 18 | 19 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] 20 | public byte []advData; 21 | 22 | [MarshalAs(UnmanagedType.U4)] 23 | public UInt32 advDataLen; 24 | } 25 | 26 | [DllImport("BleWinrtDll.dll", EntryPoint = "StartDeviceScan", CharSet=CharSet.Unicode)] 27 | public static extern void StartDeviceScan(string[] requiredServices, int n); 28 | 29 | [DllImport("BleWinrtDll.dll", EntryPoint = "PollDevice")] 30 | public static extern ScanStatus PollDevice(ref DeviceUpdate device, bool block); 31 | 32 | [DllImport("BleWinrtDll.dll", EntryPoint = "StopDeviceScan")] 33 | public static extern void StopDeviceScan(); 34 | 35 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 36 | public struct Service 37 | { 38 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)] 39 | public string uuid; 40 | }; 41 | 42 | [DllImport("BleWinrtDll.dll", EntryPoint = "ScanServices", CharSet = CharSet.Unicode)] 43 | public static extern void ScanServices(string deviceId); 44 | 45 | [DllImport("BleWinrtDll.dll", EntryPoint = "PollService")] 46 | public static extern ScanStatus PollService(out Service service, bool block); 47 | 48 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 49 | public struct Characteristic 50 | { 51 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)] 52 | public string uuid; 53 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)] 54 | public string userDescription; 55 | }; 56 | 57 | [DllImport("BleWinrtDll.dll", EntryPoint = "ScanCharacteristics", CharSet = CharSet.Unicode)] 58 | public static extern void ScanCharacteristics(string deviceId, string serviceId); 59 | 60 | [DllImport("BleWinrtDll.dll", EntryPoint = "PollCharacteristic")] 61 | public static extern ScanStatus PollCharacteristic(out Characteristic characteristic, bool block); 62 | 63 | [DllImport("BleWinrtDll.dll", EntryPoint = "SubscribeCharacteristic", CharSet = CharSet.Unicode)] 64 | public static extern bool SubscribeCharacteristic(string deviceId, string serviceId, string characteristicId, bool block); 65 | 66 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 67 | public struct BLEData 68 | { 69 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] 70 | public byte[] buf; 71 | [MarshalAs(UnmanagedType.I2)] 72 | public short size; 73 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 74 | public string deviceId; 75 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 76 | public string serviceUuid; 77 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] 78 | public string characteristicUuid; 79 | }; 80 | 81 | [DllImport("BleWinrtDll.dll", EntryPoint = "PollData")] 82 | public static extern bool PollData(out BLEData data, bool block); 83 | 84 | [DllImport("BleWinrtDll.dll", EntryPoint = "SendData")] 85 | public static extern bool SendData(in BLEData data, bool block); 86 | 87 | [DllImport("BleWinrtDll.dll", EntryPoint = "Quit")] 88 | public static extern void Quit(); 89 | 90 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 91 | public struct ErrorMessage 92 | { 93 | [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)] 94 | public string msg; 95 | }; 96 | 97 | [DllImport("BleWinrtDll.dll", EntryPoint = "GetError")] 98 | public static extern void GetError(out ErrorMessage buf); 99 | 100 | [DllImport("BleWinrtDll.dll", EntryPoint = "Disconnect", CharSet=CharSet.Unicode)] 101 | public static extern void Disconnect(string deviceId); 102 | 103 | public delegate void DebugLogCallback(string message); 104 | [DllImport("BleWinrtDll.dll", EntryPoint = "RegisterLogCallback")] 105 | public static extern void RegisterLogCallback(DebugLogCallback deviceId); 106 | } -------------------------------------------------------------------------------- /Samples/Materials/Background Darken.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-8514852794665966605 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 7 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Background Darken 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3003 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _DetailTex: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _EmissionMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MainTex: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _MetallicGlossMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _OcclusionMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _ParallaxMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - _SpecGlossMap: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_Lightmaps: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_LightmapsInd: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | - unity_ShadowMasks: 96 | m_Texture: {fileID: 0} 97 | m_Scale: {x: 1, y: 1} 98 | m_Offset: {x: 0, y: 0} 99 | m_Ints: [] 100 | m_Floats: 101 | - _AlphaClip: 0 102 | - _AlphaToMask: 0 103 | - _Blend: 0 104 | - _BlendModePreserveSpecular: 1 105 | - _BlendOp: 0 106 | - _BumpScale: 1 107 | - _ClearCoatMask: 0 108 | - _ClearCoatSmoothness: 0 109 | - _ColorMask: 15 110 | - _Cull: 2 111 | - _Cutoff: 0.5 112 | - _DetailAlbedoMapScale: 1 113 | - _DetailNormalMapScale: 1 114 | - _DstBlend: 0 115 | - _DstBlendAlpha: 0 116 | - _EnvironmentReflections: 1 117 | - _GlossMapScale: 0 118 | - _Glossiness: 0 119 | - _GlossyReflections: 0 120 | - _Metallic: 0 121 | - _OcclusionStrength: 1 122 | - _Parallax: 0.005 123 | - _QueueOffset: 2 124 | - _ReceiveShadows: 1 125 | - _SampleGI: 0 126 | - _Smoothness: 0.5 127 | - _SmoothnessTextureChannel: 0 128 | - _SpecularHighlights: 1 129 | - _SrcBlend: 1 130 | - _SrcBlendAlpha: 1 131 | - _Stencil: 0 132 | - _StencilComp: 8 133 | - _StencilOp: 0 134 | - _StencilReadMask: 255 135 | - _StencilWriteMask: 255 136 | - _Strength: 0.2 137 | - _Surface: 0 138 | - _UseUIAlphaClip: 0 139 | - _WorkflowMode: 1 140 | - _ZWrite: 1 141 | m_Colors: 142 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 143 | - _Color: {r: 0, g: 0, b: 0, a: 0.2} 144 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 145 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 146 | m_BuildTextureStacks: [] 147 | -------------------------------------------------------------------------------- /Samples/Materials/Background Highlight.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-8514852794665966605 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 11 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | version: 7 16 | --- !u!21 &2100000 17 | Material: 18 | serializedVersion: 8 19 | m_ObjectHideFlags: 0 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_Name: Background Highlight 24 | m_Shader: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 25 | m_Parent: {fileID: 0} 26 | m_ModifiedSerializedProperties: 0 27 | m_ValidKeywords: [] 28 | m_InvalidKeywords: [] 29 | m_LightmapFlags: 4 30 | m_EnableInstancingVariants: 0 31 | m_DoubleSidedGI: 0 32 | m_CustomRenderQueue: 3003 33 | stringTagMap: {} 34 | disabledShaderPasses: [] 35 | m_LockedProperties: 36 | m_SavedProperties: 37 | serializedVersion: 3 38 | m_TexEnvs: 39 | - _BaseMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _BumpMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _DetailAlbedoMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _DetailMask: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _DetailNormalMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _DetailTex: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _EmissionMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _MainTex: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _MetallicGlossMap: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - _OcclusionMap: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - _ParallaxMap: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | - _SpecGlossMap: 84 | m_Texture: {fileID: 0} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | - unity_Lightmaps: 88 | m_Texture: {fileID: 0} 89 | m_Scale: {x: 1, y: 1} 90 | m_Offset: {x: 0, y: 0} 91 | - unity_LightmapsInd: 92 | m_Texture: {fileID: 0} 93 | m_Scale: {x: 1, y: 1} 94 | m_Offset: {x: 0, y: 0} 95 | - unity_ShadowMasks: 96 | m_Texture: {fileID: 0} 97 | m_Scale: {x: 1, y: 1} 98 | m_Offset: {x: 0, y: 0} 99 | m_Ints: [] 100 | m_Floats: 101 | - _AlphaClip: 0 102 | - _AlphaToMask: 0 103 | - _Blend: 0 104 | - _BlendModePreserveSpecular: 1 105 | - _BlendOp: 0 106 | - _BumpScale: 1 107 | - _ClearCoatMask: 0 108 | - _ClearCoatSmoothness: 0 109 | - _ColorMask: 15 110 | - _Cull: 2 111 | - _Cutoff: 0.5 112 | - _DetailAlbedoMapScale: 1 113 | - _DetailNormalMapScale: 1 114 | - _DstBlend: 0 115 | - _DstBlendAlpha: 0 116 | - _EnvironmentReflections: 1 117 | - _GlossMapScale: 0 118 | - _Glossiness: 0 119 | - _GlossyReflections: 0 120 | - _Metallic: 0 121 | - _OcclusionStrength: 1 122 | - _Parallax: 0.005 123 | - _QueueOffset: 2 124 | - _ReceiveShadows: 1 125 | - _SampleGI: 0 126 | - _Smoothness: 0.5 127 | - _SmoothnessTextureChannel: 0 128 | - _SpecularHighlights: 1 129 | - _SrcBlend: 1 130 | - _SrcBlendAlpha: 1 131 | - _Stencil: 0 132 | - _StencilComp: 8 133 | - _StencilOp: 0 134 | - _StencilReadMask: 255 135 | - _StencilWriteMask: 255 136 | - _Strength: 0.2 137 | - _Surface: 0 138 | - _UseUIAlphaClip: 0 139 | - _WorkflowMode: 1 140 | - _ZWrite: 1 141 | m_Colors: 142 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 143 | - _Color: {r: 1, g: 1, b: 1, a: 0.019607844} 144 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 145 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 146 | m_BuildTextureStacks: [] 147 | --------------------------------------------------------------------------------