static int ClearMesh(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { TMPro.TextMeshProUGUI obj = (TMPro.TextMeshProUGUI)ToLua.CheckObject <TMPro.TextMeshProUGUI>(L, 1); obj.ClearMesh(); return(0); } else if (count == 2) { TMPro.TextMeshProUGUI obj = (TMPro.TextMeshProUGUI)ToLua.CheckObject <TMPro.TextMeshProUGUI>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.ClearMesh(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: TMPro.TextMeshProUGUI.ClearMesh")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void FixedUpdate() { if (Input.GetKeyUp(KeyCode.Return)) { GameObject text = GameObject.Find("ConsoleText"); TMPro.TextMeshProUGUI text_mesh_pro = text.GetComponent <TMPro.TextMeshProUGUI>(); string text_value = text_mesh_pro.text; ConsoleManager(text_value); text_mesh_pro.ClearMesh(); } }
void OnDestroy() { // FIXME: This should not be necessary if TextMeshProUGUI would dispose everything that it allocates. nameText.ClearMesh(); }