Unity-Logs-Viewer icon indicating copy to clipboard operation
Unity-Logs-Viewer copied to clipboard

Log Viewer doesn't work with input system

Open Jacko123490 opened this issue 3 years ago • 4 comments

I have imported the file into my project but the calls using the 'Input' namespace isn't supported with the Unity input system. I have implemented my own fixes to the code for my personal use fine but as I am just using PC this won't work for touch-based systems and my modified version won't detect if the game is using the input system. Despite this here are the steps I took to fix it for you to get started with:

All work is done in the Reporter.cs file. Added 'using UnityEngine.InputSystem;' to the start of the file. Modified the isGestureDone(), isDoubleClickDone(), getDownPos(), and getDrag() functions: - Swapped, Input.GetMouseButtonDown/Up(0) with Mouse.current.leftButton.wasPressed/RelesedThisFrame - Swapped, Input.GetMouseButton(0) with Mouse.current.leftButton.isPressed - Swapped, all mose position calls with Mouse.current.position.ReadValue() (using .x and .y for float outputs) - Deleted all the if IOS or Android platform calls in these functions to remove the conflicting function calls.

Let me know if you want to see the code.

Jacko123490 avatar Jul 28 '21 12:07 Jacko123490

Hi, I'm not sure I faced the same problem. What I encountered is Input of LogViewer is mal-function on both android/ios platforms , but fine on editor/WebGL . So I can open interface (by circle gesture), i can scroll upper bar (to rightest), but un-able to tap any button or row of log .

My unity is 2018.

NDark avatar Aug 06 '21 15:08 NDark

I feel like you might have misinterpreted my post, first of all, I am talking purely about windows/WebGL as that is what my project is on. Secondly, my issue is relating to the conflict with the default Unity Input management interface and any project using the special 'Input System'. (https://docs.unity3d.com/Packages/[email protected]/manual/QuickStartGuide.html) If you are having a different issue maybe try posting a new issue separately instead.

Jacko123490 avatar Aug 06 '21 15:08 Jacko123490

@Jacko123490 , you are correct. Will do as you said.

NDark avatar Aug 07 '21 10:08 NDark

Reporter.cs.zip Try this, open with the ULV_ENABLE_INPUT_SYSTEM macro

cnscj avatar May 17 '24 12:05 cnscj