กลับไป เครื่องมือ
เขียนโค้ด

Unity Input System

โดย Unity Technologies

กำหนด actions และ bindings สำหรับ keyboard, mouse, gamepad, touch และ XR ใน Unity เหมาะกับระบบควบคุมที่รองรับหลายอุปกรณ์

tool

ติดตั้ง Input System ผ่าน Package Manager คู่มือนี้อ้างอิงรุ่น 1.14 เปิด Edit > Project Settings > Input System Package > Input Actions แล้วสร้าง project-wide Actions Asset ปรับ Player/UI maps และ bindings จากนั้นอ่าน action ผ่าน C# หรือใช้ PlayerInput ตาม workflow ที่เลือก หากใช้ PlayerInput ให้อ่านจาก actions ของ component นั้น ตรวจ Active Input Handling และรีสตาร์ต Editor เมื่อเปลี่ยนระบบ input

อ้างอิง: https://docs.unity3d.com/Packages/com.unity.inputsystem@1.14/manual/QuickStartGuide.html · https://docs.unity3d.com/Packages/com.unity.inputsystem@1.14/manual/Installation.html · https://docs.unity3d.com/Packages/com.unity.inputsystem@1.14/manual/PlayerInput.html

ดูแหล่งที่มา