{"id":1572,"date":"2020-04-03T19:18:00","date_gmt":"2020-04-03T11:18:00","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1572"},"modified":"2020-04-18T08:52:47","modified_gmt":"2020-04-18T00:52:47","slug":"%e5%8f%8d%e5%b0%84","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1572","title":{"rendered":"[UE]\u53cd\u5c04"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>UFunction *Injured = this->FindFunction(TEXT(\"Injured\"));\nif (Injured)\n{\n    ProcessEvent(Injured, nullptr);\n}<\/code><\/pre>\n\n\n\n<p>UObject::FindFunction \u63d0\u4f9b\u4e86\u67e5\u627e\u672c\u7c7b\u51fd\u6570\u7684\u529f\u80fd<br>AActor::ProcessEvent \u63d0\u4f9b\u4e86\u6267\u884c\u51fd\u6570\u7684\u529f\u80fd<\/p>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528UTypeName::StaticClass()\u6216\u8005FTypeName::StaticStruct()\u6765\u83b7\u53d6\u53cd\u5c04\u7c7b\u578b\u5bf9\u5e94\u7684UClass\u4ee5\u53caUScriptStruct <\/p>\n\n\n\n<p>\u8fed\u4ee3\u4e00\u4e2aUStruct\u7684\u6240\u6709\u6210\u5458\uff0c\u53ef\u4ee5\u4f7f\u7528TFieldIterator:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for (TFieldIterator&lt;UProperty> PropIt(GetClass()); PropIt; ++PropIt)\n{\n  UProperty* Property = *PropIt;\n  \/\/ Do something with the property \n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/ObjectCN-1024x482.png\" alt=\"\" class=\"wp-image-1575\" srcset=\"https:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/ObjectCN-1024x482.png 1024w, https:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/ObjectCN-300x141.png 300w, https:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/ObjectCN-768x361.png 768w, https:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/ObjectCN-70x33.png 70w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>UObject::FindFunction \u63d0\u4f9b\u4e86\u67e5\u627e\u672c\u7c7b\u51fd\u6570\u7684\u529f\u80fdAActor::ProcessEvent  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,27],"tags":[20],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1572"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1572"}],"version-history":[{"count":6,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1572\/revisions"}],"predecessor-version":[{"id":1806,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1572\/revisions\/1806"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}