{"id":33117883,"url":"https://github.com/mmeiburg/unityAndroidSensors","last_synced_at":"2025-11-19T20:02:52.731Z","repository":{"id":219325854,"uuid":"166466865","full_name":"mmeiburg/unityAndroidSensors","owner":"mmeiburg","description":"Access to android sensors for Unity","archived":false,"fork":false,"pushed_at":"2019-10-15T12:01:30.000Z","size":1561,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-13T01:17:14.594Z","etag":null,"topics":["android","scriptableobject","unity","unity2d","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmeiburg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-18T20:12:23.000Z","updated_at":"2024-05-13T01:17:15.633Z","dependencies_parsed_at":null,"dependency_job_id":"42808a5b-1408-4504-9702-bc9986445c1d","html_url":"https://github.com/mmeiburg/unityAndroidSensors","commit_stats":null,"previous_names":["mmeiburg/unityandroidsensors"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mmeiburg/unityAndroidSensors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmeiburg%2FunityAndroidSensors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmeiburg%2FunityAndroidSensors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmeiburg%2FunityAndroidSensors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmeiburg%2FunityAndroidSensors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmeiburg","download_url":"https://codeload.github.com/mmeiburg/unityAndroidSensors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmeiburg%2FunityAndroidSensors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285319005,"owners_count":27151474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","scriptableobject","unity","unity2d","unity3d","unity3d-plugin"],"created_at":"2025-11-15T03:00:29.919Z","updated_at":"2025-11-19T20:02:52.725Z","avatar_url":"https://github.com/mmeiburg.png","language":"C#","funding_links":[],"categories":["Contents \u003c!-- omit in toc --\u003e"],"sub_categories":["Game Engine Plugins and Tools"],"readme":"# Android Sensors for Unity\n\n## Overview\n\nWant to get the light sensor output or other cool stuff of your Android smartphone? This package provide you an easy access to the Android _Sensor Manager_. You can get a full list of possible sensors on this [page](https://developer.android.com/guide/topics/sensors/sensors_overview). Each output get stored in a smart variable.\n\nInspired by the talk of Ryan Hipple's ([twitter](https://twitter.com/roboryantron) | [github](https://github.com/roboryantron)) amazing talk from Unite Austin 2017, you can find part of that in the unity [blog post](https://unity3d.com/how-to/architect-with-scriptable-objects), I wrote a simple event system based on _Scriptable Objects_. These system allows you to drag \u0026 drop variables and events around.\n## Installation\n\n* Grab unityAndroidSensors.unitypackage from the Releases page for everything you need!\n* OR, use the git repository.\n* Tested with Unity 2018.3 (New Prefab Workflow) or above.\n\n## What you get\n\nFirstly, You have access to every sensor value of the Android _Sensor Manager_.\nSecondly, You get a simple extentable event system which allows you to create _SmartEvents_ and _SmartVars_ in the project view.\n\n## Events and Variables\n\nTo create a new _SmartEvent_ or a _SmartVar_ you can use the _Create-\u003eSensorPlugin-\u003eSmartData_ context menu in the project view.\n\n\u003cimg src=\"https://imgur.com/GEdXIWy.png\" alt=\"Sensor Reader\" width=\"550\" height=\"70\"\u003e\n\nEvents are accessible via the ListenSmartEvent Component\n\n\u003cimg src=\"https://imgur.com/rIUHGut.png\" alt=\"Sensor Reader\" width=\"250\" height=\"145\"\u003e\n\nHere you can listen to _SmartEvent_'s. If a event gets fired all callbacks get invoked.\n\nThese are particularly useful for game-level events, such as starting, pausing the game, a player dying etc.\n\n## Variables\n\nVariables are just container of data, with the advantage that you can drag \u0026 drop them around like the events.\n\n## Comparators\n\nFloat- and IntVars can be compared by the _Float_- or _IntVarComparator_. You can choose to compare with a constant or another smart variable.\n\n\u003cimg src=\"https://imgur.com/QTrOR0t.png\" alt=\"Sensor Reader\" width=\"250\" height=\"115\"\u003e\n\n### Unity Sensor Plugin\n\nThe heart of the plugin is the _UnitySensorPlugin_ class. You need the class just once in your scene to get the connection to your Android phone. All sensor readers communicate with the _UnitySensorPlugin_ to get the sensor data as a float[3] array.\n\n### Sensor Reader\n\nThe *Sensor Reader* provides you with some option to choose the right sensor, the output type and the update interval (per frame). The output is stored in a _SmartVar_. This can be of type float, int or Vector3.\n\nIf you choose int or float you have the option to select the specific axis of the output value, otherwise you get all axis as a _Vector3Var_.\n\n\u003cimg src=\"https://imgur.com/jv05QNT.png\" alt=\"Sensor Reader\" width=\"300\" height=\"360\"\u003e\n\n## Modifier\n\nIf you want to modifiy the output of a sensor before it is written into a _SmartVar_ you can create a modifier which can manipulate the raw float[3] array from the sensor.\n\nAn example of a modifier is in the Modifier folder.\nIt is applied to the pre-configured acceleration sensor.\n\n## New Unity Input System (Update 2019-10-15)\nHey guys with the new input system the plugin is obsolet. https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Sensors.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmeiburg%2FunityAndroidSensors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmeiburg%2FunityAndroidSensors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmeiburg%2FunityAndroidSensors/lists"}