{"id":1066,"date":"2022-05-23T21:40:53","date_gmt":"2022-05-23T21:40:53","guid":{"rendered":"https:\/\/lucyestela.com\/dev\/?p=1066"},"modified":"2022-05-24T00:35:42","modified_gmt":"2022-05-24T00:35:42","slug":"ue4-referring-to-a-widget-in-your-blueprint","status":"publish","type":"post","link":"https:\/\/lucyestela.com\/dev\/unreal\/ue4-referring-to-a-widget-in-your-blueprint\/","title":{"rendered":"Unreal Quick Tip &#8211; Referring to a widget in your blueprint"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\n<p>I struggled over this for a while and then found the answer.&nbsp;<\/p>\n<p class=\"\">Say you have a Blueprint and within your BP you have a widget. If you want to call a function that&#8217;s in your widget from your blueprint, then it&#8217;s slightly more complicated than just dragging the widget component into your function from the Components window. There are two extra steps<\/p>\n<p class=\"\">Step1 &#8211; drag reference from Components Window<\/p>\n<p class=\"\">Step2 &#8211; Get User Widget Object<\/p>\n<p class=\"\">Step3 &#8211; Cast to your widget BP<\/p>\n<p>Step4 &#8211; Call your function in the widget BP<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1067 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget.png\" alt=\"\" width=\"1091\" height=\"449\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget.png 1091w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-300x123.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-1024x421.png 1024w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-768x316.png 768w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-250x103.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-550x226.png 550w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-800x329.png 800w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-437x180.png 437w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/05\/referenceWidget-729x300.png 729w\" sizes=\"auto, (max-width: 1091px) 100vw, 1091px\" \/><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I struggled over this for a while and then found the answer.&nbsp; Say you have a Blueprint and within your BP you have a widget. If you want to call a function that&#8217;s in your widget from your blueprint, then it&#8217;s slightly more complicated than just dragging the widget component into your function from the &#8230; <a title=\"Unreal Quick Tip &#8211; Referring to a widget in your blueprint\" class=\"read-more\" href=\"https:\/\/lucyestela.com\/dev\/unreal\/ue4-referring-to-a-widget-in-your-blueprint\/\" aria-label=\"More on Unreal Quick Tip &#8211; Referring to a widget in your blueprint\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[59],"tags":[122,126,45,121],"class_list":["post-1066","post","type-post","status-publish","format-standard","hentry","category-unreal","tag-blueprint","tag-quicktip","tag-unreal","tag-widgets"],"_links":{"self":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/comments?post=1066"}],"version-history":[{"count":4,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1066\/revisions"}],"predecessor-version":[{"id":1077,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1066\/revisions\/1077"}],"wp:attachment":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/media?parent=1066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/categories?post=1066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/tags?post=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}