My UnityEvent doesn't "show the events"

So, I am making a 2D platformer puzzle game and when I touch a trigger, an event will start, but there is nowhere I can assign these events!
Here is the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class OnButtonPress : MonoBehaviour
{
    public UnityEvent OnPress;
    public UnityEvent OnStay;
    public UnityEvent OnLeave;


    void OnTriggerEnter2D()
    {
        OnPress.Invoke();
    }
    void OnTriggerStay2D()
    {
        OnStay.Invoke();
    }
    void OnTriggerLeave2D()
    {
        OnLeave.Invoke();
    }
}

First define your event class and then declare it like below:

[Serializable] public class PressEvent : UnityEvent { }

public PressEvent OnPress;

Now you will see your event in the inspector.