{"id":3357,"date":"2022-05-21T11:04:34","date_gmt":"2022-05-21T09:04:34","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=3357"},"modified":"2026-03-09T13:52:47","modified_gmt":"2026-03-09T11:52:47","slug":"why-your-adddynamic-delegate-is-not-working","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/why-your-adddynamic-delegate-is-not-working\/","title":{"rendered":"Unreal AddDynamic() Delegate Is Not Working"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3357\" class=\"elementor elementor-3357\" data-elementor-post-type=\"asx-lms-tutorial-cpt\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-66ccbb0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"66ccbb0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-590bbc1\" data-id=\"590bbc1\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-07cbddb elementor-widget elementor-widget-text-editor\" data-id=\"07cbddb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>There are multiple reasons why a function that was bound using <a href=\"https:\/\/docs.unrealengine.com\/4.27\/en-US\/ProgrammingAndScripting\/ProgrammingWithCPP\/UnrealArchitecture\/Delegates\/Dynamic\/\" target=\"_blank\" rel=\"noopener\">AddDynamic()<\/a> may not get called or appear not to work in Unreal Engine C++. This Tutorial will cover some of those scenarios and how to solve them.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-da9eb5b elementor-widget elementor-widget-heading\" data-id=\"da9eb5b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Common Developer Mistakes<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-93cd43a elementor-widget elementor-widget-text-editor\" data-id=\"93cd43a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ol><li>You are not getting Delegates by <strong>reference<\/strong> before you call <strong>AddDynamic<\/strong> On Them. You should almost <strong>always <\/strong>get a reference to the delegate, not a copy. Example of how <strong>NOT<\/strong> to do it:<p>FDelegateName theDelegate= getDelegateFunction();<\/p><p>This is wrong and you will get a copy instead of the delegate you want to bind to. Instead, use:<br \/><br \/><\/p><p><strong>FDelegateName&amp;<\/strong> theDelegate= getDelegateFunction();<br \/><br \/><\/p><p>Emphasis on the ampersand sign( get by reference).<br \/><br \/><\/p><\/li><li><p>The delegate is not getting Broadcast anywhere in the code. If Delegate-&gt;Broadcast is not getting called anywhere in the code, that means listeners(functions) will never get triggered. Sometimes this may be your error if its a custom delegate or a bug within the engine itself if its an engine delegate. The delegate may not have ever been called.<br \/><br \/><\/p><\/li><li>Garbage Collection. Check if your delegate owners or broadcasters are not getting deleted on invalidated by the garbage collector. Ensure you have protected\/or added them for reference counting by using UPROPERTY where appropriate.<\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b669ace elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b669ace\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-78bc0e7\" data-id=\"78bc0e7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7836cc3 elementor-align-left elementor-widget elementor-widget-button\" data-id=\"7836cc3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-md elementor-animation-buzz\" href=\"https:\/\/discord.gg\/SYUybztE3s\" target=\"_blank\" rel=\"noopener\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Join Us On Discord<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":0,"template":"","asx-lms-tutorial-categories":[58,45],"asx-lms-tutorial-tags":[46],"class_list":["post-3357","asx-lms-tutorial-cpt","type-asx-lms-tutorial-cpt","status-publish","hentry","asx-lms-tutorial-categories-unreal-c-api","asx-lms-tutorial-categories-unreal-engine","asx-lms-tutorial-tags-cpp","entry"],"acf":[],"_links":{"self":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/3357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt"}],"about":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/types\/asx-lms-tutorial-cpt"}],"version-history":[{"count":0,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/3357\/revisions"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=3357"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=3357"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=3357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}