cancel
Showing results for 
Search instead for 
Did you mean: 

Input field not working with Interaction SDK

mecadiego113
Explorer

I'm using the brand new Interaction SDK with Meta Quest 2, but there is something that is not working at all: input field typing. Nor editor or PC build, input fields (TextMesh or legacy) are not receiving typing from my hardware keyboard.

 

I'm using the ray interaction system to select to input field.

2 REPLIES 2

CafeSingularity
Explorer

It appears that the PointableCanvasModule.cs is missing a method for keyboard input. To resolve this, you can reference OVRInputModule.cs and transplant the SendUpdateEventToSelectedObject() method into the Process() function. This should help ensure that keyboard input functions correctly.

public override void Process()
{
      SendUpdateEventToSelectedObject();

      ProcessPointers(_pointersForDeletion, true);
      ProcessPointers(_pointerMap.Values, false);
}

private bool SendUpdateEventToSelectedObject()
{
       if (eventSystem.currentSelectedGameObject == null) return false;

       var data = GetBaseEventData();
       ExecuteEvents.Execute(eventSystem.currentSelectedGameObject, data, ExecuteEvents.updateSelectedHandler);
       return data.used;
}

 

This works great!