File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Packages/com.unity.inputsystem/InputSystem/Plugins/UI Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 3131////TODO: add ability to query which device was last used with any of the actions
3232////REVIEW: also give access to the last/current UI event?
3333
34- ////TODO: ToString() method a la PointerInputModule
35-
3634namespace UnityEngine . InputSystem . UI
3735{
3836 /// <summary>
@@ -2616,6 +2614,22 @@ public InputActionAsset actionsAsset
26162614 }
26172615 }
26182616
2617+ public override string ToString ( )
2618+ {
2619+ System . Text . StringBuilder stringBuilder = new System . Text . StringBuilder ( "<b>Pointer Input Module of type: </b>" + ( object ) this . GetType ( ) ) ;
2620+ stringBuilder . AppendLine ( ) ;
2621+
2622+ foreach ( PointerModel keyValuePair in this . m_PointerStates )
2623+ {
2624+ if ( keyValuePair . eventData != null )
2625+ {
2626+ stringBuilder . AppendLine ( "<B>Pointer:</b> " + ( object ) keyValuePair . screenPosition ) ;
2627+ stringBuilder . AppendLine ( keyValuePair . eventData . ToString ( ) ) ;
2628+ }
2629+ }
2630+ return stringBuilder . ToString ( ) ;
2631+ }
2632+
26192633 [ SerializeField , HideInInspector ] private InputActionAsset m_ActionsAsset ;
26202634 [ SerializeField , HideInInspector ] private InputActionReference m_PointAction ;
26212635 [ SerializeField , HideInInspector ] private InputActionReference m_MoveAction ;
You can’t perform that action at this time.
0 commit comments