Unity Editor 实用小技巧
在编辑器下运行协同(IEnumerator)函数,只需在函数头上加一个[ExecuteInEditMode]:
1 2 3 4 5 6 7 8 9 10 11 |
[ExecuteInEditMode] protected void Test() { Debug.Log("Call in Test Mode"); StartCoroutine(Post()); } protected IEnumerator Post() { //you code } |
在编辑器下快速调用某个 Continue reading Unity Editor 实用小技巧