How do I create my own blueprint node with C++?

iUltimateLP
Mon, 29 Sep 2014 18:16:16 +0000
Blueprint

Hey there, I have a basic question, how can I implement own blueprint nodes into the game. I added C++ code to my game which class type is “EdGraphNode”. So it creates an .h and an .cpp file of my class. So this is the .h file:

#pragma once

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

/**
 *
 */
UCLASS()
class EDIFY_API UMyEdGraphNode : public UEdGraphNode
{
	GENERATED_UCLASS_BODY()

};

My .cpp file:

#include "EDIFY.h"
#include "MyEdGraphNode.h"


UMyEdGraphNode::UMyEdGraphNode(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	//
}

I read that I have to implement this UFUNCTION in the files, but where? My tries to implement the line there where the // stands, that doesn’t work for me. Please help!

10 posts - 6 participants