{"id":32696962,"url":"https://github.com/mahdirahmatii/unity-easy-haptic-manager","last_synced_at":"2025-11-07T00:02:32.340Z","repository":{"id":321939778,"uuid":"1087295569","full_name":"MahdiRahmatii/Unity-Easy-Haptic-Manager","owner":"MahdiRahmatii","description":"A lightweight, dependency-free Unity plugin that delivers consistent, customizable haptic feedback on all Android devices. It bridges Unity C# with Android’s native VibrationEffect and VibratorManager APIs for precise, reliable control over vibration strength and duration.","archived":false,"fork":false,"pushed_at":"2025-11-01T14:31:56.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-01T15:14:42.110Z","etag":null,"topics":["android","feedback","gamefeel","haptic-feedback","haptics","mobile-development","mobile-game","unity","unity-android","unity-csharp","unity-native-plugin","unity-plugin","vibration","vibration-effect"],"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/MahdiRahmatii.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T17:14:29.000Z","updated_at":"2025-11-01T14:31:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MahdiRahmatii/Unity-Easy-Haptic-Manager","commit_stats":null,"previous_names":["mahdirahmatii/unity-easy-haptic-manager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MahdiRahmatii/Unity-Easy-Haptic-Manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahdiRahmatii%2FUnity-Easy-Haptic-Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahdiRahmatii%2FUnity-Easy-Haptic-Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahdiRahmatii%2FUnity-Easy-Haptic-Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahdiRahmatii%2FUnity-Easy-Haptic-Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MahdiRahmatii","download_url":"https://codeload.github.com/MahdiRahmatii/Unity-Easy-Haptic-Manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahdiRahmatii%2FUnity-Easy-Haptic-Manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282529256,"owners_count":26684508,"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-03T02:00:05.676Z","response_time":108,"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","feedback","gamefeel","haptic-feedback","haptics","mobile-development","mobile-game","unity","unity-android","unity-csharp","unity-native-plugin","unity-plugin","vibration","vibration-effect"],"created_at":"2025-11-01T19:01:28.444Z","updated_at":"2025-11-03T21:01:48.894Z","avatar_url":"https://github.com/MahdiRahmatii.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Easy Haptic Manager (Android)\n\nA lightweight and consistent **Haptic feedback plugin for Unity (Android)**.  \nIt gives you precise vibration control across all Android devices — from older phones to the latest Android 14+ models.\n\n---\n\n## 🚀 Features\n\n- ✅ Simple API — just one line to trigger vibration.\n- ✅ Works on **all Android devices (API 21+)**\n- ✅ Uses `VibratorManager` automatically on Android 12+ (multi-motor support)\n- ✅ Supports **custom vibration duration and amplitude**\n- ✅ Provides **5 adjustable haptic levels** — from subtle taps to strong impacts\n- ✅ Safe fallback (`Handheld.Vibrate`) in Editor or non-Android builds\n\n---\n\n## 📦 Installation\n\n1. **Clone or download** this repository.  \n2. Copy the folders into your Unity project.\n3. Ensure your Android Manifest includes: \u003cem\u003e(This is already included if you use the provided manifest in /Plugins/Android/..)\u003c/em\u003e\n```xml\n\u003cuses-permission android:name=\"android.permission.VIBRATE\" /\u003e\n```\n4. Build your project for Android. That’s it — no Gradle or Java configuration needed.\n\n---\n\n# 🧠 Usage\n\n1️⃣ Initialize (required once)\n\nCall this early, like in your game’s startup scene:\n```\nvoid Start() =\u003e HapticManager.Initialize();\n```\n\n2️⃣ \u003cstrong\u003eSimple Vibrate\u003c/strong\u003e: predefined haptic levels\n```\n1. HapticManager.SimpleVibrate(HapticLevel.VeryLight);\n2. HapticManager.SimpleVibrate(HapticLevel.Light);\n3. HapticManager.SimpleVibrate(HapticLevel.Medium);\n4. HapticManager.SimpleVibrate(HapticLevel.Heavy);\n5. HapticManager.SimpleVibrate(HapticLevel.Extreme);\n```\n\n3️⃣ \u003cstrong\u003eCustom Vibrate\u003c/strong\u003e: define your own vibration\n```\nHapticManager.CustomVibrate(duration: 80, amplitude: 200); // Duration (ms), Amplitude (1–255)\n```\n\n4️⃣ Stop ongoing vibration\n```\nHapticManager.Stop();\n```\n\n🎛️ Simple Haptic Levels\n| Level | Name      | Duration (ms) | Amplitude |\n| ----- | --------- | ------------- | --------- |\n| 1     | VeryLight | 15            | 40        |\n| 2     | Light     | 25            | 80        |\n| 3     | Medium    | 40            | 150       |\n| 4     | Heavy     | 70            | 220       |\n| 5     | Extreme   | 100           | 255       |\n\n---\n\n## 🎮 Demo Scene\n\nA sample scene is included at:\n\n```\nAssets\\Plugins\\Android\\HapticPlugin\\Demo\\...\n```\nIt provides UI buttons to test each Haptic Level and verify everything is working properly on your Android device.\n\n---\n\n⭐ If this plugin helps your project, consider giving it a star on GitHub! 🙏\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdirahmatii%2Funity-easy-haptic-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahdirahmatii%2Funity-easy-haptic-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdirahmatii%2Funity-easy-haptic-manager/lists"}