Osero Suite by Jeren Osero
FabYouTubeJeren Osero
  • Osero Suite
  • About
  • Frequently Asked Questions
  • Support
  • Featured Assets
    • [FEATURED] Module Creator
  • Supported Assets
    • Module Creator
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Accessing the Module Creator
        • UI Outline
        • Module Templates
        • Plugin Content
        • Project Settings
      • How To Use (Legacy 5.1)
      • Frequently Asked Questions
    • Plugin Sync Tool
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Accessing the Plugin Sync Tool
        • UI Outline
        • Project Settings
      • How to Use (Legacy 5.1)
    • Render Results Screen
      • About
      • Changelog
      • How to Use (5.2+)
        • Tutorial
        • Making Sure the Plugin is Active
        • Movie Render Queue Job Additions
        • UI Outline
          • Render Results Window
          • Render Graph
          • Contact Sheet
        • Accessing Previous Render Results
        • Data Handler
        • Plugin Content
        • Project Settings
        • Code Reference
          • Classes
            • UOS_RRS_DataHandler
            • UOS_RRS_RenderDataLibrary
          • Structs
            • FOS_RRS_JobData
            • FOS_RRS_ResultData
            • FOS_RRS_ShotData
          • Enums
            • EOS_RRS_RenderResult
      • How to Use (Legacy 5.1)
  • TECHNICAL NOTES
    • Foreword
    • Unreal Engine Notes
      • Actor Components
        • Component Transforms
      • Blueprints
        • Add Function to Promotable Operator Nodes
      • Compile Errors
        • Implicit Capture of 'This' via '[=]' is Deprecated
        • Specified Type Modifiers Are Not Allowed Here
        • Static Function in Namespace Not Defined
        • Circular Dependency Detected
        • Inconsistent Dll Linkage
        • Overloaded Member Function Note Found (Compile Error in .gen File)
      • Debugging
        • UIAction.h Line 139
      • Details Customisation
        • Add External Property to Details Panel
        • Default Slate Styles
      • Ed Modes
        • Registering Editor Modes
      • Editor/Engine
        • Get Engine Version in C++
        • Extending the Editor with FExtender
      • Input
        • Get Key or Mouse Button in C++
        • Mouse Cursor Location in World (3D Space)
      • Level Editor
        • Select Actor Component via C++
      • Meta Specifiers
        • Reference
        • Edit Condition
        • Bind Widget
      • Rendering
        • Set Graphics Card Timeout
      • Sequencer
        • Project Default: Completion Mode
      • Slate
        • Default Editor Icons
        • Test Suite
        • Set Default Value for Slate Arguments
        • Cast Between Different Slate Classes
        • Set UObject Delegate for TAttribute<T>
      • Trace
        • Simple Line Trace
        • Complex Traces
          • ETraceTypeQuery
          • EObjectTypeQuery
      • UObject
        • "Config" Specifier Does not Work Properly in 5.4+
      • UPlugins
        • Loading Phases
      • UPROPERTIES
        • GetOptions (meta)
      • Viewport
        • Get Piloted Viewport Actor
        • Update Pivot Location
      • Water Plugin
        • General
        • C++ Summary
        • Details Customisation
        • Classes Overview
          • UWaterSplineMetadata
          • FWaterSplineComponentVisualizer
        • Water Meshes
    • Windows Notes
      • Get Around "This App Has Been Blocked For Your Protection"
      • Windows Keyboard Layout Boot Loop
      • Disable Copilot
      • Disable "Search the Web" in Windows Search
    • Visual Studio Notes
      • Turn Off Auto Brackets
      • Disable Unreal Engine Integration Log
  • BUY OSERO SUITE PRODUCTS
    • Fab
  • SOCIALS
    • YouTube
    • Rumble
    • Twitter/X
    • Instagram
    • LinkedIn
    • Jeren Osero Website
Powered by GitBook
On this page
  1. TECHNICAL NOTES
  2. Unreal Engine Notes
  3. Slate

Set UObject Delegate for TAttribute<T>

By default, TAttribute<T> can create the following:

  • Lambda

  • Raw

  • SP

  • Static

But the UFunction and UObject delegates need extra bullshit.

Either, the TAttribute has to be pre-initialised:

TAttribute<T> AttributeDelegate = TAttribute<T>();
AttributeDelegate.BindUObject(this, &UMyObject::MyDelegate);

Or, it can be created inline by using the basic “Create” and then a “FGetter”:

TAttribute<T>::Create(TAttribute<T>::FGetter::CreateUObject(this, &UMyObject::MyDelegate))

Example from Osero Suite: Plugin Sync Tool using TAttribute<FSlateColor>:

SCB_Plugins->AddSlot()
[
  SNew(SButton)
  .Text(FText::FromString(PluginFolders[i]))
  .ButtonColorAndOpacity(TAttribute<FSlateColor>::Create(TAttribute<FSlateColor>::FGetter::CreateUObject(Settings, &UOS_PST_Settings::PluginToSyncColour, PluginFolders[i])))
  .OnClicked_UObject(Settings, &UOS_PST_Settings::ButtonClicked_PluginToSync, PluginFolders[i])
];

Last updated 3 days ago