{"id":15250,"date":"2024-07-31T23:34:11","date_gmt":"2024-07-31T14:34:11","guid":{"rendered":"https:\/\/madnesslabo.net\/utage\/?page_id=15250"},"modified":"2025-10-25T16:38:23","modified_gmt":"2025-10-25T07:38:23","slug":"inputsystem%e5%af%be%e5%bf%9c","status":"publish","type":"page","link":"https:\/\/madnesslabo.net\/utage\/?page_id=15250","title":{"rendered":"InputSystem\u5bfe\u5fdc"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>Unity\u3067\u306f\u5165\u529b\u51e6\u7406\u3092\u6271\u3046\u57fa\u672c\u30b7\u30b9\u30c6\u30e0\u304c\u3001InputManager\u3068\u3044\u3046\u65e7\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u3001InputSystem\u3068\u3044\u3046\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\nInputSystem\u306fUnity\u516c\u5f0f\u306e\u8ffd\u52a0\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u306e\u3067\u3059\u304c\u3001\u6700\u8fd1\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u591a\u3044\u305f\u3081\u3001<br \/>\n\u5bb44.1.2\u304b\u3089InputSystem\u7d4c\u7531\u3067\u5165\u529b\u51e6\u7406\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>InputSystem\u95a2\u4fc2\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001Assets\/Utage\/ExtensionSupport\/InputSystem\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/madnesslabo.net\/utage\/wp-content\/uploads\/2024\/07\/ss_0611.png\" alt=\"\" \/><\/p>\n<h2>InputSystem\u5bfe\u5fdc\u306f\u81ea\u52d5\u7684\u306b\u9069\u7528<\/h2>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bInputSystem\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u9069\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u81ea\u52d5\u7684\u306bInputSystem\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bInputSystem\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u5f93\u6765\u901a\u308aInputManager\u7d4c\u7531\u3067\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\nInputManager\u3068InputSystem\u3092\u4f75\u7528\u3059\u308b\u3001Both\uff08\u4e21\u5bfe\u5fdc\u30e2\u30fc\u30c9\uff09\u8a2d\u5b9a\u306e\u5834\u5408\u306f\u3001\u7279\u306b\u5bfe\u5fdc\u4f5c\u696d\u3092\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3067\u3059\u3002<br \/>\nInputManager\u3092\u4f7f\u7528\u3057\u3066\u3044\u305f\u72b6\u614b\u304b\u3089\u3001InputSystem\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306e\u624b\u9806\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>InputManager\u3092\u6392\u9664\u3057\u3066\u3001InputSystem\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408<\/h3>\n<p>InputManager\u3092\u4f7f\u7528\u3057\u3066\u3044\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u3001InputSystem\u306b\u5b8c\u5168\u306b\u79fb\u884c\u3057\u3001InputManager\u3092\u4f7f\u7528\u3059\u308b\u306e\u3092\u3084\u3081\u308b\u5834\u5408\u306f\u624b\u4f5c\u696d\u3067\u5bfe\u5fdc\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>1.Edit &gt; Project Settings &gt; Player &gt; Other Settings &gt; Configuration \u306e<br \/>\nActive Input Handling\u3092\u300cInput System Package(New)\u300d\u306b\u3057\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/madnesslabo.net\/utage\/wp-content\/uploads\/2025\/10\/ss_1191.png\" alt=\"\" \/><\/p>\n<p>2.\u30b7\u30fc\u30f3\u5185\u306e\u3001EventSystem\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u300cStandAlone Input Module\u300d\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u305f\u5834\u5408\u3001\u4e0b\u8a18\u753b\u50cf\u306e\u3088\u3046\u306a\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001<br \/>\n\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u300cInput System UI Input Module\u300d\u306b\u5909\u63db\u3057\u307e\u3059\u3002<br \/>\n\uff08\u65e2\u306bInput System UI Input Module\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u5bfe\u5fdc\u4e0d\u8981\uff09<br \/>\n<img decoding=\"async\" src=\"https:\/\/madnesslabo.net\/utage\/wp-content\/uploads\/2025\/10\/ss_1190.png\" alt=\"\" \/><\/p>\n<p>\u5bb44.2.0\u3088\u308a\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4f5c\u6210\u3057\u305f\u5bb4\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306fInputManager\u304bBoth\uff08\u4e21\u5bfe\u5fdc\uff09\u3067\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001InputSystem\u306e\u307f\u306e\u4f7f\u7528\u306b\u79fb\u884c\u3059\u308b\u5834\u5408\u306f\u4e0a\u8a18\u306e\u4f5c\u696d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>InputUtil\u306e\u62bd\u8c61\u5316<\/h2>\n<p>Utage\u3067\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u5165\u529b\u306a\u3069\u306e\u30dc\u30bf\u30f3\u5165\u529b\u51e6\u7406\u306f\u3001\u300cInputUtil\u300d\u3068\u3044\u3046static\u306aWrapper\u30af\u30e9\u30b9\u3092\u7d4c\u7531\u3057\u3066\u884c\u3063\u3066\u3044\u3044\u305f\u306e\u3067\u3059\u304c\u3001<br \/>\nInputSystem\u5bfe\u5fdc\u3092\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u5177\u4f53\u7684\u306a\u5165\u529b\u30ad\u30fc\u306e\u30e1\u30bd\u30c3\u30c9\u540d\u304b\u3089\u3001\u5165\u529b\u30ad\u30fc\u7b49\u3092\u62bd\u8c61\u5316\u3057\u5165\u529b\u306e\u76ee\u7684\u540d\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3082\u3057\u3001\u81ea\u4f5c\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u51e6\u7406\u306a\u3069\u3067\u3001\u5bb4\u306eInputUtil\u7d4c\u7531\u3067\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u308b\u3082\u306e\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u3001\u8b66\u544a\u304c\u3067\u307e\u3059\u306e\u3067\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u3042\u308b\u4ee3\u66ff\u30e1\u30bd\u30c3\u30c9\u306b\u5909\u66f4\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff08\u4e00\u5fdc\u305d\u306e\u307e\u307e\u3067\u3082\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001\u8b66\u544a\u304c\u6b8b\u3063\u305f\u307e\u307e\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<pre><code class=\"language-csharp\">        \/\/\u5f37\u5236\u30b9\u30ad\u30c3\u30d7\u5165\u529b\u304c\u3042\u3063\u305f\u304b\n        public static bool IsInputForceSkip()\n        {\n            if (!EnableInput) return false;\n            return InputStrategy.IsInputForceSkip();\n        }\n        \/\/UI\u5165\u529b\u3092\u62bd\u8c61\u5316\u3059\u308b\u305f\u3081\u3001\u30e1\u30bd\u30c3\u30c9\u540d\u3092\u5909\u66f4\n        [Obsolete(&quot;Use &quot;+nameof(IsInputForceSkip) + &quot; instead&quot;)]\n        public static bool IsInputControl()\n        {\n            return IsInputForceSkip();\n        }\n<\/code><\/pre>\n<h2>\u81ea\u4f5c\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u30de\u30c3\u30d7\u306a\u3069\u3067\u5165\u529b\u51e6\u7406\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408<\/h2>\n<p>\u5bb4\u306eInptuSystem\u5bfe\u5fdc\u306e\u30b3\u30fc\u30c9\uff08Assets\/Utage\/ExtensionSupport\/InputSystem\/InputSystemStrategy.cs\uff09\u306f\u3001\u5177\u4f53\u7684\u306a\u30ad\u30fc\u3084\u30dc\u30bf\u30f3\u5165\u529b\u3092\u691c\u77e5\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u81ea\u4f5c\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u30de\u30c3\u30d7\u306a\u3069\u3092\u4f7f\u3063\u3066\u3001\u5165\u529b\u51e6\u7406\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306f<br \/>\nIInputStrategy\u3092\u7d99\u627f\u3057\u305f\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3066\u5165\u529b\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u3001<br \/>\nInputUtil.SetInputStrategy();\u3000\u3092\u4f7f\u3063\u3066\u3001\u5bb4\u306e\u4f7f\u7528\u3059\u308b\u5165\u529b\u51e6\u7406\u3092\u4e0a\u66f8\u304d\u3057\u3066\u66f8\u304d\u63db\u3048\u308b\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u3001\u30b5\u30f3\u30d7\u30eb<\/p>\n<pre><code class=\"language-csharp\">    \/\/\u81ea\u4f5c\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u30de\u30c3\u30d7\u3092\u4f7f\u3063\u305f\u5165\u529b\u51e6\u7406\u3092\u9069\u7528\u3059\u308b\u30b5\u30f3\u30d7\u30eb\n    \/\/IInputStrategy\u3092\u7d99\u627f\u3057\u3066\u3001\u81ea\u4f5c\u306e\u5165\u529b\u51e6\u7406\u3092\u5b9f\u88c5\u3059\u308b\n    public class SampleInputSystemStrategy :\n        MonoBehaviour,\n        IInputStrategy\n    {\n        public PlayerInput PlayerInput =&gt; playerInput;\n        [SerializeField] PlayerInput playerInput;\n\n        void Awake()\n        {\n            \/\/InputUtil.SetInputStrategy()\u3092\u4f7f\u3063\u3066\u3001\u81ea\u4f5c\u306e\u5165\u529b\u51e6\u7406\u3092\u9069\u7528\u3059\u308b\n            InputUtil.SetInputStrategy(this);\n        }\n\n        public bool IsInputGuiClose()\n        {\n            \/\/\u30a2\u30af\u30b7\u30e7\u30f3\u30de\u30c3\u30d7\u3092\u53d6\u5f97\n            return PlayerInput.actions[&quot;GuiClose&quot;].ReadValue&lt;bool&gt;();\n        }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 Unity\u3067\u306f\u5165\u529b\u51e6\u7406\u3092\u6271\u3046\u57fa\u672c\u30b7\u30b9\u30c6\u30e0\u304c\u3001InputManager\u3068\u3044\u3046\u65e7\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u3001InputSystem\u3068\u3044\u3046\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002 InputSystem\u306fUnity\u516c\u5f0f\u306e\u8ffd\u52a0\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u306e\u3067\u3059\u304c\u3001\u6700\u8fd1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":15270,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"_lmt_disableupdate":"no","_lmt_disable":"no","jetpack_post_was_ever_published":false,"footnotes":""},"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P58j32-3XY","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/15250"}],"collection":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15250"}],"version-history":[{"count":5,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/15250\/revisions"}],"predecessor-version":[{"id":15881,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/15250\/revisions\/15881"}],"up":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/15270"}],"wp:attachment":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}