When using the project with a PS5 controller (device name: HID:Wireless Controller), a NullReferenceException occurs at the following line in UIHook.cs (EnterGameMenuSystem.OnUpdate):
The exception will be thrown when the project tries to retrieve the texture for the controller.
Expected Behavior
The project should handle the PS5 controller correctly and not throw any exceptions when retrieving the texture for the controller actions.
Additional Information
The issue seems to be related to the UIHook.Instance.GetSchemeTextureCollectionFromName($"{device.description.interfaceName}:{device.description.product}); function, which returns null when the PS5 controller is used.
Environment
Go to the UI Hook Component in the PlayGround and add a new entry in the ControllerNameAndTexturePairs array, linking to the PS5 controller's Texture Collection with HID:Wireless Controller not just HID:DualSense Wireless Controller
Issue Description
When using the project with a PS5 controller (device name:
HID:Wireless Controller
), aNullReferenceException
occurs at the following line inUIHook.cs
(EnterGameMenuSystem.OnUpdate):Steps to Reproduce
Expected Behavior
The project should handle the PS5 controller correctly and not throw any exceptions when retrieving the texture for the controller actions.
Additional Information
The issue seems to be related to the UIHook.Instance.GetSchemeTextureCollectionFromName($"{device.description.interfaceName}:{device.description.product}); function, which returns null when the PS5 controller is used. Environment
Unity version: 2022.3.26f1 Controller: PS5 Controller connected via USB-C Cable (device name: HID:Wireless Controller)
Possible Solution
Go to the UI Hook Component in the PlayGround and add a new entry in the
ControllerNameAndTexturePairs
array, linking to the PS5 controller's Texture Collection withHID:Wireless Controller
not justHID:DualSense Wireless Controller