Can not serialize template UnityEvent

[System.Serializable]
public class PropertyChangedSubscriber<T> : MonoBehaviour where T : struct
{

    [SerializeField]
    private GenericReference<T> _value;
    [SerializeField]
    private UnityEvent<object,PropertyChangedEventArgs<T>> _response;

    void OnEnable() {
        _value.PropertyChangedEventHandler += PropertyChanged;
    }
    void OnDisable() {
        _value.PropertyChangedEventHandler -= PropertyChanged;
    }

    private void PropertyChanged(object sender, PropertyChangedEventArgs<T> e) {
        _response.Invoke(sender,e);
    }
}
[System.Serializable]

public class IntPropertyChangedSubscriber : PropertyChangedSubscriber<int> { }
public class GenericReference<T> : ScriptableObject where T : struct {
    [SerializeField]
    private T _value;
    [SerializeField]
    private T _constantValue;
    [SerializeField]
    private bool _isConstant;
    public event EventHandler<PropertyChangedEventArgs<T>> PropertyChangedEventHandler;

    public T Value
    {
        get { return _isConstant ? _constantValue : _value; }
        set
        {
            if (!_isConstant) {
                var oldValue = _value;
                _value = value;
                PropertyChangedEventHandler(this, new PropertyChangedEventArgs<T> { OldValue = oldValue, NewValue = _value });
            }
            else {
                _value = _constantValue;
            }
        }
    }
}

I use IntPropertyChangedSubscriber but can not serialize fields.

I think your problem is “object”. Unity can serialize several basic types (string, int, bool, etc), it can serialize classes/structs made from those types, and it can serialize UnityObject-derived types. “object” is one of the few things that Unity flat-out can’t serialize. You’ll have to use something more specific as your first generic argument for that UnityEvent.

I check and inspect. It needs to change.
The problem is “GenericReference” and “UnityEvent<object,PropertyChangedEventArgs>” fields.
They have to encapsulate in other non generic classes like IntReference and IntPropertyChangedUnityEvent.
So I can not use template/generics and have to write one by one. It is so awful.

object parameter is OK and can see dyname functions in the inspector corresponding to it.