using System; using UnityEngine; using UnityEngine.UI;
public class Test : MonoBehaviour { public Button Transfer_Button;//传送按钮 public Transform TargetTransform;//传送目的地(可以拖到脚本上,也可以通过代码找到) public Transform Person;//人物 private void Start() { Transfer_Button.onClick.AddListener(Transfer_Button_Click); }