using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class VariTester : MonoBehaviour { static VariTester ins; [SerializeField] Text text; [SerializeField] InputField inputField; [SerializeField] Text textAny; void Awake() { if (ins) Destroy(gameObject); else { ins = this; DontDestroyOnLoad(this); text.text = "当前参数值为:" + o0.Bow.o09AxisAfterXiaMenFromDll.vari.ToString(); inputField.onEndEdit.AddListener((s) => { double num = double.Parse(s); if (double.IsNaN(num) || double.IsInfinity(num)) return; o0.Bow.o09AxisAfterXiaMenFromDll.vari = num; text.text = "当前参数值为:" + o0.Bow.o09AxisAfterXiaMenFromDll.vari.ToString(); }); } } void LateUpdate() { textAny.text = o0.Bow.o09AxisAfterXiaMenFromDll.debugInfo; } }