title: Why doesn't Event Trigger work in unity 2d?
body: <p>I have created a UI Button in unity 2d and it works fine. But I think the event trigger component doesn't work. I want to make the button bigger when the cursor is on the button and return to normal size when the cursor exits it. Here is my script...</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class PlayAgainButton : MonoBehaviour
  {
      public void PointerEnter()
      {
          Debug.Log(&quot;Enter&quot;);
          transform.localScale = new Vector2(1.2f, 1.2f);
      }
  
      public void PointerExit()
      {
          Debug.Log(&quot;Exit&quot;);
          transform.localScale = new Vector2(1f, 1f);
      }
  
      // Start is called before the first frame update
      void Start()
      {
          
      }
  
      // Update is called once per frame
      void Update()
      {
          
      }
  }
  </code></pre>
  <p>When I play the game, the Console says that the cursor has entered and exited</p>
  <p><a href="https://i.stack.imgur.com/LMlem.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMlem.png" alt="Console" /></a></p>
  <p>But the scale of the button never changes.</p>
  <p>What is wrong here?</p>