public void Init(GameObject obj, MonoBehaviourProxy mb) { string s = "test test test from cs2lua !"; Debug.Log(s); mb.StartCoroutine(this.TestCoroutine()); root = new GameObject("root"); var slider = GameObject.Find("Canvas/Slider").GetComponent(typeof(UnityEngine.UI.Slider)) as UnityEngine.UI.Slider; var counttxt = GameObject.Find("Canvas/Count").GetComponent(typeof(UnityEngine.UI.Text)) as UnityEngine.UI.Text; slider.onValueChanged.AddListener((float v) => { Reset(); counttxt.text = LuaString.Format("cube:{0}", v); max = (int)v; }); Reset(); }
public void Init(GameObject obj, MonoBehaviourProxy mb) { root = new GameObject("mandelbrot"); Exec(); }