Help making Desktop Notifications callable from blueprints

I am trying to create desktop notifications that are callable in blueprints, but I know that this needs to be implemented in C++ to be done. So far I’ve been using blueprint function libraries to try and get it to work but I know very little C++ and am finding it very hard, what is the best way to make this happen?

Thanks

This is a great little overview of using Unreal’s built in notifications. You would absolutely do this using a Blueprint function library.

http://www.teal-game.com/blog/desktopnotifications/

Thank you, I was using this as a basis but have been running into lots of LNK errors and getting my head very stuck. I could post the code if that helps… Are there any guide for this specifically for blueprint function libraries?

Posting the errors you get would help.

The code is at Myblueprintfunctionlibrary.h:// Fill out your copyright notice in the Descript - Pastebin.com and it gives me the errors:

MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: static class FSlateNotificationManager & __cdecl FSlateNotificationManager::Get(void)” (_imp?Get@FSlateNotificationManager@@SAAEAV1@XZ) referenced in function “public: static void __cdecl UMyBlueprintFunctionLibrary::AddNotificationToScreen(class FText const &)” (?AddNotificationToScreen@UMyBlueprintFunctionLibrary@@SAXAEBVFText@@@Z)
MyBlueprintFunctionLibrary.cpp.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: class TSharedPtr __cdecl FSlateNotificationManager::AddNotification(struct FNotificationInfo const &)” (_imp?AddNotification@FSlateNotificationManager@@QEAA?AV?$TSharedPtr@VSNotificationItem@@$0A@@@AEBUFNotificationInfo@@@Z) referenced in function “public: static void __cdecl UMyBlueprintFunctionLibrary::AddNotificationToScreen(class FText const &)” (?AddNotificationToScreen@UMyBlueprintFunctionLibrary@@SAXAEBVFText@@@Z)
MyBlueprintFunctionLibrary.cpp.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) private: static float const FOptionalSize::Unspecified” (_imp?Unspecified@FOptionalSize@@0MB)
D:\School\UE\Projects\ShooterTemplate\Binaries\Win64\UE4Editor-MP_SK.dll : fatal error LNK1120: 3 unresolved externals

I’ve commented lots of the code to reduce the amount of LNK errors, but even the core code is throwing these. It seems to be a problem with the input but I can’t figure out what…

I believe you just need to link to the Slate libraries. By default, Unreal doesn’t link in modules that are “optional” to cut down on bloat. If you use some of these modules you need to tell it to link it in.

Open your *.build.cs file. You should see a line like this:

PublicDependencyModuleNames.AddRange

It is possible you see a line like this as well:

PrivateDependencyModuleNames.AddRange(new string[] {  });

If you see that private dependencies line you’ll want to edit that, otherwise you want to add it below the public dependencies line to this:

PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

Thank you so much, that was all I needed!