using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class jianqieban : MonoBehaviour { [SerializeField] string Str; [SerializeField] Button btn; // Start is called before the first frame update void Start() { btn.onClick.AddListener(() => { GUIUtility.systemCopyBuffer = Str; }); } }