{"id":20009179,"url":"https://github.com/damians-eng/gyro-unity","last_synced_at":"2025-05-04T19:35:50.037Z","repository":{"id":175310564,"uuid":"653700065","full_name":"DamianS-eng/Gyro-Unity","owner":"DamianS-eng","description":"An archive to document sources, references and examples of gyroscopic input into a Unity project.","archived":true,"fork":false,"pushed_at":"2023-11-16T18:14:47.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T01:43:23.514Z","etag":null,"topics":[],"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/DamianS-eng.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}},"created_at":"2023-06-14T14:49:08.000Z","updated_at":"2024-02-08T18:07:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfa617eb-e366-4686-81ad-eba20b2e4e9b","html_url":"https://github.com/DamianS-eng/Gyro-Unity","commit_stats":null,"previous_names":["damians-eng/gyro-unity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianS-eng%2FGyro-Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianS-eng%2FGyro-Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianS-eng%2FGyro-Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianS-eng%2FGyro-Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DamianS-eng","download_url":"https://codeload.github.com/DamianS-eng/Gyro-Unity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252390636,"owners_count":21740355,"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","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":[],"created_at":"2024-11-13T07:14:33.707Z","updated_at":"2025-05-04T19:35:49.699Z","avatar_url":"https://github.com/DamianS-eng.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gyro-Unity\nAn archive to document sources, references and examples of gyroscopic input into a Unity project.\n\n## Build for Windows\n\nFirst, upgrade to the Unity [Input System Package](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.6/manual/index.html). Use the Package Manager to update, and in Project Settings -\u003e Player -\u003e OS -\u003e Other Settings -\u003e Active Input Handling, change to the newer system. Check that Input Manager is disabled in the settings.\n\nIn Project Settings -\u003e Input System Package, Create a new settings asset.\n\n![Settings Asset](https://connect-prd-cdn.unity.com/20201207/learn/images/f40d3341-d1a4-49dc-ac68-20ca4a21dd74_tut1_12.png.1400x0x1.png)\n\nAdd Component \"Player Input\" to the player model.\nIn Player Input, Create Actions, and save the file with the assets.\n\n\n\n\n\n\n\n\n## [Reference Video: Unity- how to make a player controller with gyroscope and accelerometer](https://youtu.be/jvwX5WthM2o)\n\n**This project was meant for Android mobile.**\n\nIn Unity, File -\u003e Build Settings\n\n  Switch platform to Android. Download required Android module from Unity Hub, if necessary.\n  \n  ![Build Settings](Saved%20Pictures/buildSettings.png)\n  \nProject template should include a 3D Plane Object for the Ground and a Capsule 3D Cylinder for the player model.\n\n  Add a Character Controller component on the player model.\n  \n  In the Assets/Scripts folder of the project, create a C# Script called *PlayerController.cs*, and add the script as a component to the player model.\n  \n  Drag the Character Controller component to the Controller menu in the Player Controller script component.\n  \n  In Unity, Edit -\u003e Project Settings -\u003e Adaptive Performance, check the necessary Android Providers.\n  \n  In Unity, Edit -\u003e Project Settings \u003e Player \u003e Android (Tab) \u003e Publishing Settings \u003e Custom Gradle Properties Template\n  \n  Delete all files in: C:\\Users\\you\\.gradle\\caches\n  \n  In Unity, Edit -\u003e Preferences -\u003e External Tools\n  \n  Update in Window -\u003e Package Manager\n  \n  Adjust Version number and Project Name at File -\u003e Build Settings -\u003e Player Settings -\u003e (Bundle Version Code)\n  \n  Copy all folders and files inside Editor/Data/PlaybackEngines/AndroidPlayer/SDK/cmdline-tools, create a new folder called Tools inside AndroidPlayer folder and paste there.\n  \n  The problem is that the SDK folder needs to be readable on Windows explorer, and Windows always makes the folder read-only automatically. I used to be able to make the folders non-read-only which made my code compile, but now it is not letting me change the status of the SDK from read-only to readable. \n  \n   Copy the SDK folder to documents, unitick the read only, and change SDK the folder on Unity preferences. Apparently there is a lock on the usual unity java SDK folder. \n\n### General Tips\n\nTo check controller input:\n\nWindow -\u003e Analysis -\u003e Input Debugger\n\n[Gradle Build Failures](https://support.unity.com/hc/en-us/articles/4408584577044-Why-do-I-get-errors-when-using-a-Gradle-file-with-an-old-aaptOptions-noCompress-property-)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamians-eng%2Fgyro-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamians-eng%2Fgyro-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamians-eng%2Fgyro-unity/lists"}