Native Mobile Input
Unity Plugin Documentation
© SkangoGames LLC 2025, All rights reserved.
✨ Features
- Move Canvas: Moves the entire canvas up when the keyboard appears
- Platform-specific handling for Android and iOS
- Smooth animations for all transitions
- Automatic scroll view handling
- Editor simulation with keyboard overlay
- Support for both regular InputField and TextMeshPro InputField, but Text MeshPro is Highly recommended! Regular inputField does not hide virtual input box. We provide Tool to easily convert your regular fields to TextMeshPro fields using Tools>Native Mobile Input>Convert Legacy Input Fields to TMP
- Configurable movement limits for portrait and landscape modes
- Option to ignore specific input fields
🚀 Installation
- Import the 'Native Mobile Input' package into your Unity project
- Add the NativeMobileInput prefab from package prefabs folder to your scene. That's it!
- For Editor simulation, place a keyboard image in
Resources/Keyboard
You can play around with settings now to get best results, even at runtime, no need to reload the scene. If you want to ignore some fields from our plugin, you can, read that in another section in documentation.
⚙️ Usage - Basic Setup
- Add the NativeMobileInput prefab to your scene
- Configure the settings in the Inspector to adjust how the canvas moves when the keyboard appears
⚙️ Configuration Options
General Settings
- Extra Offset: Additional space between keyboard and input field
- Enable For Android: Toggle keyboard handling for Android devices
- Enable For iOS: Toggle keyboard handling for iOS devices
Animation Settings
- Enable Smooth Animation: Toggle smooth transitions
- Animation Duration: Duration of smooth animations in seconds
Movement Limits
- Portrait Max Movement: Maximum canvas movement in portrait mode (0-1)
- Landscape Max Movement: Maximum canvas movement in landscape mode (0-1)
Editor Simulation
- Enable Editor Simulation: Toggle keyboard overlay in Unity Editor
🔒 Ignoring Specific Input Fields
To exclude specific input fields from the plugin's behavior:
- Add the
IgnoreNativeMobileInput
component to the input field GameObject
- The plugin will now ignore this input field and won't adjust its position or zoom
// Example
inputField.gameObject.AddComponent<IgnoreNativeMobileInput>();
📜 Scroll View Integration
- Passing drag events from input fields to their parent ScrollRect
- Allowing natural scrolling behavior when touching input fields
- Maintaining proper scroll position during keyboard visibility
💡 Best Practices
1. Canvas Setup:
- Use Screen Space - Overlay Camera render mode
- Ensure your UI elements are properly anchored
2. Input Fields:
- Place input fields within ScrollRects if you want to handle scrolling interruption from input fields, it works by passing events from input field to parent scrollrects. This is only required for scrolling, if you don't use scroll ignore.
- Use the IgnoreNativeMobileInput component for fields that shouldn't be adjusted
3. Performance:
- Enable smooth animations for better user experience
- Adjust movement limits based on your UI layout
📱 Platform Support
- Android: Fully supported with native keyboard handling
- iOS: Fully supported with native keyboard handling
- Editor: Includes keyboard overlay simulation for testing
📋 Requirements
- Unity 2019.4 or later
- TextMeshPro (for TMP_InputField support)
⚠️ Troubleshooting
1. Input Fields Not Moving:
- Verify the canvas render mode
- Ensure the input field isn't marked with IgnoreNativeMobileInput
- Adjust native mobile inputs settings
2. Keyboard Overlay Not Showing in Editor:
- Verify the keyboard image is in the Resources/Keyboard folder
- Check if editor simulation is enabled
3. Scrolling Issues:
- Ensure input fields are properly nested within ScrollRects
- Check if the ScrollRect's content size fits properly.
📄 License
This is proprietary software. All rights reserved. See LICENSE file for full terms and conditions.
For licensing inquiries, please contact: [email protected]
↑