Unity 6.2 Beta – OnMouseDown Not Working: Quick Fix
-
Problem:
OnMouseDown()event not triggering on 3D objects like Sphere in Unity 6.2 beta. -
Cause: Unity 6.2 uses the New Input System by default, which doesn't support legacy
OnMouseDown()events. -
Expected Setup:
-
Script with
OnMouseDown()attached to GameObject (e.g., Sphere). -
GameObject has collider component.
-
Script logs "Click" to console.
-
-
But: Event never fires due to input system incompatibility.
✅ Solution
-
Go to Edit > Project Settings > Player.
-
Under Other Settings, find Active Input Handling.
-
Change from Input System Package (New) → Both.
-
Apply changes and restart Unity when prompted.
-
Re-test the click in Play Mode → ✅
OnMouseDown()works now!
💡 Notes
-
Use "Both" option to support legacy and new input systems.
-
Useful when migrating older Unity projects to 6.2 beta or later.
No comments:
Post a Comment