Custom Blueprint nodes are not working in 4.7 preview 2

I’m trying to add a custom blueprint node, but it does not show up in the editor.
Created an empty project and tried to follow this guide

Here’s my code:

MyEdGraphNode.h:

#pragma once

#include "EdGraph/EdGraphNode.h"
#include "MyEdGraphNode.generated.h"

/**
 * 
 */
UCLASS()
class MYPROJECT_API UMyEdGraphNode : public UEdGraphNode
{
	GENERATED_BODY()

	UFUNCTION(BlueprintPure, meta = (FriendlyName = "Hello World", CompactNodeTitle = "HelloWorld", Keywords = "String Hello World"), Category = Game)
	static FText HelloWorld();
 
 	
};

MyEdGraphNode.cpp:

#include "MyProject.h"
#include "MyEdGraphNode.h"

FText UMyEdGraphNode::HelloWorld()
{
	return FText::FromString("Hello World");
}

Looks like that the bug was introduced somewhere between revisions
1dd24d607310d0ad6c6eac15cf6ff9d8ffffba11 and
d352f8edad29ac619b62081ae8ac695738f35ef3 in branch 4.7

Hi serioussam909,

Subclassing EdGraphNode is actually not the correct way to create a new custom node for your Blueprints. I’ll make myself a note to see if we can get in touch with the User who created this tutorial to get it updated.

The preferred method for accomplishing this task is actually somewhat simpler. You just need to add the function for your node to an existing Actor class (it may work with any class, but I always use Actor classes), or create a new class just for the node. Add the UFUNCTION macro and declaration to the class header file and the function definition to the class source file, build the project in Visual Studio, and your new node will be available in your Blueprint. Be aware of the access specifier you are using, though. If you create the function as a private function, then only Blueprints made from that class will be able to use the node. If you make the function public, any Blueprint will be able to use the node.

For example, I just created a new code project using the First Person template. I opened the default character class header file and added the following code under a public: access specifier:

UFUNCTION(BlueprintPure, meta = (FriendlyName = "Hello World", CompactNodeTitle = "HelloWorld", Keywords = "String Hello World"), Category = Game)
static FText HelloWorld();

Then I opened the default character class source file and added the following code:

FText ATestCustomNodeCharacter::HelloWorld()
{
	return FText::FromString("Hello World");
}

I then built the project in Visual Studio and re-opened it in the Editor. I opened the level Blueprint, added a Begin Play node that executed a Print String node, then searched for and added my new node and wired it into the In String pin on the Print String node.

26799-helloworld.png

Starting PIE mode yielded a “Hello World” message in the top left corner of the viewport.

If you want to create an entirely custom node - not just a function - is the guide here correct? A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums (custom node with dynamically allocated pins, execution logic, etc)

Hi Benholio,

I haven’t looked through that tutorial, but I’ll try to set aside some time soon to go through it and make sure it is still up to date.