using System;
using UnityEngine.EventSystems;
namespace Unity.VisualScripting
{
///
/// Called when a move event occurs.
///
[UnitCategory("Events/GUI")]
[UnitOrder(21)]
public sealed class OnMove : GameObjectEventUnit
{
public override Type MessageListenerType => typeof(UnityOnMoveMessageListener);
protected override string hookName => EventHooks.OnMove;
///
/// The axis event data.
///
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput data { get; private set; }
protected override void Definition()
{
base.Definition();
data = ValueOutput(nameof(data));
}
protected override void AssignArguments(Flow flow, AxisEventData data)
{
flow.SetValue(this.data, data);
}
}
}