A lightweight drag-to-open drawer system for first-person Unity games, enabling realistic mouse-based interaction with minimal setup and clean integration.Additional Compatibility InformationDesigned and tested primarily with Universal Render Pipeline (URP)Works in URP with no code changes (visuals depend on your materials/shaders)HDRP not officially tested; interaction logic works but visuals may need adjustmentNo SRP-specific shaders includedUses standard Unity components onlyCompatible with Unity 2022.3 LTS and aboveDrag-to-Open Drawer SystemUnity 2022.3 LTS | URP & Built-in CompatibleA lightweight, realistic, and plug-and-play drag-based drawer interaction system designed for first-person Unity projects.This system allows players to physically drag drawers open and closed using mouse movement, creating natural and immersive interactions commonly seen in modern FPS and simulation games.The package is built with clean code, no external dependencies, and focuses on simplicity, performance, and Asset Store–friendly structure.Core ConceptUses a center-screen raycast to detect interactable drawersWhen the player looks at a drawer within range, a minimal interaction UI appearsPressing "E" and holding the left mouse button and dragging vertically moves the drawer along its local Z axisDrawer movement is fully clamped to prevent over-extensionAudio feedback plays only when the drawer fully opens or closesA single shared UI instance is used to prevent flickering when looking between multiple drawersKey FeaturesDrag-based drawer opening & closing (mouse-driven)Realistic, physics-free drawer movementDistance-based interaction detectionCenter-screen raycast interactionMinimal Interact UI (Image + Text)Included lightweight FPS controllerOptional open / close audio supportOne global UI controller for all drawersNo ScriptableObjectsNo CinemachineNo third-party packagesClean, readable, Asset Store–safe codeInput System Requirement (Important)This asset requires BOTH Unity Input Systems to be enabledThe system uses:(for Input.GetAxis, Mouse X / Mouse Y, mouse buttons)Old Input Manager(required for compatibility with modern Unity setups and controllers)New Input SystemYou MUST set:Project Settings → Player → Active Input HandlingBothIf only one input system is enabled, the drawer dragging and FPS controls will not work correctly.TextMeshPro Requirement (Important)TextMeshPro is REQUIREDThe interaction UI uses TextMeshPro for clean, sharp instruction text.Make sure TextMeshPro is installed:Window → TextMeshPro → Import TMP Essential ResourcesWithout TextMeshPro, the Interact UI text will not render.Included ScriptsDragDrawerHandles drawer dragging logicControls open / close limitsManages audio playbackPerforms raycast interaction detectionCommunicates with the Interact UIEnsures only one drawer controls the UI at a timeInteractUICentralized UI controller (singleton)Handles interaction image + TextMeshPro textAutomatically shows/hides based on raycast detectionSimpleFpsControllerLightweight FPS controllerMouse look + WASD movementSprint supportCursor lock / unlock handlingDesigned specifically to work with drag interactionsDrawer SetupAdd a Collider to the drawer meshAttach the DragDrawer scriptInteract RangeSet:Move SpeedMax Z OffsetAssign the Interactable layerEnsure the drawer opens along its local Z axisPlayer SetupCreate a Player GameObjectSimpleFpsControllerAdd:CharacterControllerAssign the Camera TransformMake the camera a child of the PlayerInteract UI SetupCreate a Canvas (Screen Space – Overlay)A TextMeshPro Text (instruction text)Add:An Image (interaction icon)Attach the InteractUI script to the CanvasAssign the Image and TMP Text referencesControlsLook: MouseMove: WASDSprint: Left ShiftDrag Drawer: Hold Left Mouse ButtonOpen / Close: Vertical Mouse MovementCompatibilityUnity 2022.3 LTSURPDesktop platformsNotesNo external dependenciesNo complex setupBeginner-friendlyEasy to extend for doors, cabinets, or other drag-based objects• Drag-based drawer opening and closing using mouse movement• Center-screen raycast interaction detection• Distance-based interaction range control• Minimal interact UI using Image and TextMeshPro• Single shared UI instance for all drawers• Optional open and close audio support• Lightweight FPS controller included• Compatible with URP and Built-in Render Pipeline• Requires both Old and New Unity Input Systems




