52 lines
2.9 KiB
Markdown
52 lines
2.9 KiB
Markdown
+++
|
||
date = "2024-12-29"
|
||
tags = ["ue"]
|
||
title = "ue5.5.1でps5 controllerを使う"
|
||
+++
|
||
|
||
基本的には`Game Input for Windows`というpluginを使います。しかし、問題は動かないことです。
|
||
|
||
- https://dev.epicgames.com/community/learning/tutorials/EpZ4/unreal-engine-game-input-for-windows-experimental-release-notes
|
||
- https://forums.unrealengine.com/t/tutorial-game-input-for-windows-experimental-release-notes/1763696
|
||
|
||
> GAME_INPUT_SUPPORT is false!
|
||
|
||
なぜかというと、`GDK`をインストールしたうえで、`Microsoft.GameInput`をインストールしなければならず、かつ、GDKはEngineをbuildしないとpathを認識しないからです。この際、念の為にprojectの`sln`もrebuildしましょう。
|
||
|
||
> As of the March 2024 GDK release, the GDK installer no longer installs the GameInput libraries.
|
||
>
|
||
> If you’re targeting PC, add the Microsoft.GameInput NuGet package (NuGet Gallery | Microsoft.GameInput 0.2303.22621.3038) to your solution. Run the NuGet package’s GameInput redistributable MSI to ensure that you have the latest runtime. Although the runtime is included in Windows May 2020 Updates and later, running the MSI will ensure that you have the latest version.
|
||
> Include this redistributable in game installers to ensure that GameInput is available on all supported versions of Windows."
|
||
|
||
ue5をsrcからbuildする方法です。
|
||
|
||
- https://dev.epicgames.com/documentation/ja-jp/unreal-engine/building-unreal-engine-from-source
|
||
|
||
```sh
|
||
$ git clone https://github.com/epicGames/UnrealEngine
|
||
$ cd UnrealEngine
|
||
$ ./Setup.bat
|
||
$ ./GenerateProjectFiles.bat
|
||
$ open UE5.sln
|
||
```
|
||
|
||
ここで`Engine/UE5`をbuildします。dlとbuildにはかなり時間がかかります。容量も膨大に必要になるため注意しましょう。
|
||
|
||
buildが終了すると、実行ファイルは`/Engine/Binaries/Win64/UnrealEditor.exe`にあります。
|
||
|
||
GASのprojectで試してみます。logを見てみましょう。
|
||
|
||
```sh
|
||
LogPluginManager: Mounting Engine plugin GameInputWindows
|
||
LogPluginManager: Mounting Engine plugin GameInput
|
||
LogConfig: Branch 'GameInputWindows' had been unloaded. Reloading on-demand took 0.16ms
|
||
LogConfig: Branch 'GameInput' had been unloaded. Reloading on-demand took 0.15ms
|
||
LogGameInput: GameInputBase module startup...
|
||
LogGameInput: [FGameInputBaseModule::StartupModule] Successfully created the IGameInput interface
|
||
LogGameProjectGeneration: Project GameAnimationSample requires update. Plugin GameInputWindows SupportedTargetPlatforms value in project descriptor (Win64, WinGDK) differs from value in plugin descriptor (Win64)
|
||
LogGameInput: Registering Device Callback for GameInputKind: 'Unknown'. Listening for Device Status: 'Connected'.
|
||
```
|
||
|
||
接続はできているみたいです。これでps5 controllerは動かせるようになりました。しかし、バグがあるみたいでコントロールできません。
|
||
|