Skip to main content
added more information
Source Link
Jay
  • 3k
  • 3
  • 21
  • 48

I'm having trouble understanding how the "IPointer" (IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler) interfaces are supposed to work with the New Input System.

Here is my monobehavior attached to a gameobject in my scene:

public class TextHandler : MonoBehaviour, IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler
{  
  public void OnPointerDown(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerMove(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerUp(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerClick(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  } 
}

I expect this to log errors to the console whenever I move or click the mouse, but nothing seems to happen at all - as if these unity messages (i assume) are not being sent at all?

Hovering over these interfaces tells me the following.

Interface to implement if you wish to receive OnPointerMove callbacks.

Criteria for this event is implementation dependent. For example see StandAloneInputModule.

Adding a StandAloneInputModule to an object in my scene gives the following UI warning, telling my that the StandAloneInputModule is a part of the old input system, and giving me a button to replave it with a InputSystemUIInputModule, which I already have in my scene.

enter image description here

I am using the unity 6.4 standard (New Input System) InputSystem_Actions map, which has UI point and click controls set up by default

enter image description here

Here is my InputSystemUIInputModule, also with default values. enter image description here

And my EventSystem on the same object. enter image description here

I can't find anywhere that states that these interfaces/methods are deprecated or are unsuported with the New Input System, is there some way I'm using this wrong?

I'm having trouble understanding how the "IPointer" (IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler) interfaces are supposed to work with the New Input System.

Here is my monobehavior attached to a gameobject in my scene:

public class TextHandler : MonoBehaviour, IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler
{  
  public void OnPointerDown(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerMove(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerUp(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerClick(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  } 
}

I expect this to log errors to the console whenever I move or click the mouse, but nothing seems to happen at all - as if these unity messages (i assume) are not being sent at all?

Hovering over these interfaces tells me the following.

Interface to implement if you wish to receive OnPointerMove callbacks.

Criteria for this event is implementation dependent. For example see StandAloneInputModule.

Adding a StandAloneInputModule to an object in my scene gives the following UI warning, telling my that the StandAloneInputModule is a part of the old input system, and giving me a button to replave it with a InputSystemUIInputModule, which I already have in my scene.

enter image description here

I am using the unity 6.4 standard (New Input System) InputSystem_Actions map, which has UI point and click controls set up by default

enter image description here

I can't find anywhere that states that these interfaces/methods are deprecated or are unsuported with the New Input System, is there some way I'm using this wrong?

I'm having trouble understanding how the "IPointer" (IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler) interfaces are supposed to work with the New Input System.

Here is my monobehavior attached to a gameobject in my scene:

public class TextHandler : MonoBehaviour, IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler
{  
  public void OnPointerDown(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerMove(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerUp(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerClick(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  } 
}

I expect this to log errors to the console whenever I move or click the mouse, but nothing seems to happen at all - as if these unity messages (i assume) are not being sent at all?

Hovering over these interfaces tells me the following.

Interface to implement if you wish to receive OnPointerMove callbacks.

Criteria for this event is implementation dependent. For example see StandAloneInputModule.

Adding a StandAloneInputModule to an object in my scene gives the following UI warning, telling my that the StandAloneInputModule is a part of the old input system, and giving me a button to replave it with a InputSystemUIInputModule, which I already have in my scene.

enter image description here

I am using the unity 6.4 standard (New Input System) InputSystem_Actions map, which has UI point and click controls set up by default

enter image description here

Here is my InputSystemUIInputModule, also with default values. enter image description here

And my EventSystem on the same object. enter image description here

I can't find anywhere that states that these interfaces/methods are deprecated or are unsuported with the New Input System, is there some way I'm using this wrong?

Source Link
Jay
  • 3k
  • 3
  • 21
  • 48

Unity IPointerMoveHandler, IPointerClickHandler callbacks with New Input System

I'm having trouble understanding how the "IPointer" (IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler) interfaces are supposed to work with the New Input System.

Here is my monobehavior attached to a gameobject in my scene:

public class TextHandler : MonoBehaviour, IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler
{  
  public void OnPointerDown(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerMove(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerUp(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  }

  public void OnPointerClick(PointerEventData eventData)
  {
      throw new System.NotImplementedException();
  } 
}

I expect this to log errors to the console whenever I move or click the mouse, but nothing seems to happen at all - as if these unity messages (i assume) are not being sent at all?

Hovering over these interfaces tells me the following.

Interface to implement if you wish to receive OnPointerMove callbacks.

Criteria for this event is implementation dependent. For example see StandAloneInputModule.

Adding a StandAloneInputModule to an object in my scene gives the following UI warning, telling my that the StandAloneInputModule is a part of the old input system, and giving me a button to replave it with a InputSystemUIInputModule, which I already have in my scene.

enter image description here

I am using the unity 6.4 standard (New Input System) InputSystem_Actions map, which has UI point and click controls set up by default

enter image description here

I can't find anywhere that states that these interfaces/methods are deprecated or are unsuported with the New Input System, is there some way I'm using this wrong?