嗨, 我有事件触发器的问题。我不知道如何将参数传递给函数。我需要通过编辑器来完成此操作,因为我有很多使用此脚本的对象,而此方法只是它们之间的区别。
这是我的代码片段,请简化问题:
public override void OnEndDrag(PointerEventData data)
{
lpbc = null;
if (data.pointerCurrentRaycast.gameObject == null || data.pointerCurrentRaycast.gameObject.tag!="Field")
{
return;
}
if (data.pointerCurrentRaycast.gameObject.tag == "Field")
{
//some methods to define my go
GameObject go;
//HERE I want to call function from picture BUT with my go
//when I do below line, I can call EndDrag with my function, but how to pass my argument??????????
base.OnEndDrag(data);
}
}