static int FindChild(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); GameObject arg0 = (GameObject)LuaScriptMgr.GetUnityObject(L, 1, typeof(GameObject)); string arg1 = LuaScriptMgr.GetLuaString(L, 2); GameObject o = TransformFinder.FindChild(arg0, arg1); LuaScriptMgr.Push(L, o); return(1); }
void Awake() { errorPanel = GameObject.Find("errorPanel"); GameObject text = TransformFinder.FindChild(errorPanel, "txt_errorInfo"); if (text != null) { errorText = text.GetComponent <Text>(); } GameObject btn = TransformFinder.FindChild(errorPanel, "btn_errorEnsure"); if (btn != null) { ensureBtn = btn.GetComponent <Button>(); } if (errorPanel != null) { errorPanel.SetActive(false); } }