bsimser / Inventory-Pro

https://devdog.io
MIT License
2 stars 0 forks source link

Integration issue with Rewired #289

Open bsimser opened 5 years ago

bsimser commented 5 years ago

Original report by Garret Polk (Bitbucket: GarretPolk, GitHub: GarretPolk).


Rewired has a replacement for the Standalone Input Module which I’m trying to use in my game. There's an incompatibility between Rewired's Standalone Input Module and Inventory Pro.

Inventory Pro has a function "isHoveringUIElement". In that function it tries to call the protected method “GetLastPointerEventData” with 1 parameter. This works fine with Unity's input module, but Rewired's version defines the function with different parameters and so the call fails.

For now I can just use the standard Unity module since I'm still very early in development. No worries. But it would be good to have this resolved so I can switch back.

Thanks.

Error occurs in "var eventData = "...
TargetParameterCountException: Number of parameters specified does not match the expected number.

DevDog/General/UI/Utilities/UIUtility.cs

public static bool isHoveringUIElement

The function in Rewired is

Rewired/Integration/UnityUI/RewiredPointerInputModule.cs

protected PlayerPointerEventData GetLastPointerEventData(int playerId, int pointerIndex, int pointerTypeId, bool ignorePointerTypeId, PointerEventType pointerEventType)