{"id":5168,"date":"2022-07-10T15:57:43","date_gmt":"2022-07-10T13:57:43","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=5168"},"modified":"2026-03-09T21:55:05","modified_gmt":"2026-03-09T19:55:05","slug":"ue5-delegate-params-vs-payload-data","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/ue5-delegate-params-vs-payload-data\/","title":{"rendered":"UE5 Delegate Parameters vs Payload Data"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"5168\" class=\"elementor elementor-5168\" 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-e0c868d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e0c868d\" 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-7fe4597\" data-id=\"7fe4597\" 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-49d10fa elementor-widget elementor-widget-text-editor\" data-id=\"49d10fa\" 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>You may be wondering what&#8217;s the difference between UE5 Delegate Parameters and Payload Data as described in the <a href=\"https:\/\/docs.unrealengine.com\/5.0\/en-US\/delegates-and-lamba-functions-in-unreal-engine\/\" target=\"_blank\" rel=\"noopener\">Delegate documentation.<\/a><br \/><br \/>Jump to the &#8220;<a href=\"#Example\"><strong>Payload Data Example Use Case<\/strong><\/a>&#8221; section for an explanation by example if you prefer examples.<\/p>\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-e10eeba elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"e10eeba\" 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-7d15431\" data-id=\"7d15431\" 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<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-4483d7b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4483d7b\" 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-inner-column elementor-element elementor-element-885d096\" data-id=\"885d096\" 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-2ca6293 elementor-widget elementor-widget-heading\" data-id=\"2ca6293\" 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\">The Callback Function Signature<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21ad0af elementor-widget elementor-widget-text-editor\" data-id=\"21ad0af\" 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>The main difference between Payload Data and Parameters has to do with the binding function&#8217;s signature.<\/p><p>The <strong>binding function\/callback<\/strong> <strong>signature<\/strong> has to match our <strong>delegate parameters<\/strong> <strong>PLUS<\/strong> desired extra parameters(<strong>payload data<\/strong>).<\/p><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cfd2f26 elementor-widget elementor-widget-heading\" data-id=\"cfd2f26\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Delegate Parameters<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b3726a1 elementor-widget elementor-widget-text-editor\" data-id=\"b3726a1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li>Required in <strong>EVERY<\/strong> callback function that wishes to bind to our delegate.<\/li><li>Defined when delegate is created with DECLARE_DELEGATE or any similar macro.<\/li><li>If you want every Bound function to receive data\/argument as part of it&#8217;s signature, you include it as a delegate Parameter.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ae53652 elementor-widget elementor-widget-heading\" data-id=\"ae53652\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Delegate Payload Data<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b3a6ca3 elementor-widget elementor-widget-text-editor\" data-id=\"b3a6ca3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li>Required <strong>ONLY IN<\/strong> callback functions that wish to receive <strong>extra<\/strong> parameters, in addition to the required parameters above,\u00a0 from our delegate when it broadcasts\/executes.<\/li><li>Defined when delegate is bound (bind is called) to our function.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-837cb7b elementor-widget elementor-widget-menu-anchor\" data-id=\"837cb7b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"Example\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c109605 elementor-widget elementor-widget-heading\" data-id=\"c109605\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Payload Data Example Use Case<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ad23721 elementor-widget elementor-widget-text-editor\" data-id=\"ad23721\" 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>You already have a function that takes in 8 parameters and it&#8217;s being used in other parts of your code.<\/p><p>The first two arguments of the function match our new delegate function parameters. So:<\/p><p>We already have a <strong>function<\/strong> that takes in <strong>8 arguments<\/strong> and we want to bind it to a <strong>delegate\u00a0<\/strong>that passes only<strong> 2 parameters.\u00a0<\/strong><\/p><p>The solution is to pass the rest of the <strong>6 arguments<\/strong> required by the function as Payload data at BIND time.<\/p>\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\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-5168","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\/5168","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\/5168\/revisions"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=5168"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=5168"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=5168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}