更新 Source/FLESH/Private/DismembermentGraph/DismembermentGraphBase.cpp
This commit is contained in:
@@ -19,8 +19,9 @@ void UDismembermentGraphBase::ClearGraph()
|
|||||||
|
|
||||||
UEdGraphNode* UDismembermentGraphBase::AddNode(TSubclassOf<UEdGraphNode> NodeClass, const FVector2D& Position)
|
UEdGraphNode* UDismembermentGraphBase::AddNode(TSubclassOf<UEdGraphNode> NodeClass, const FVector2D& Position)
|
||||||
{
|
{
|
||||||
// Create new node
|
// Create new node with a unique name
|
||||||
UEdGraphNode* NewNode = NewObject<UEdGraphNode>(this, NodeClass);
|
FString NodeName = FString::Printf(TEXT("Node_%s_%d"), *NodeClass->GetName(), Nodes.Num());
|
||||||
|
UEdGraphNode* NewNode = NewObject<UEdGraphNode>(this, NodeClass, *NodeName, RF_Transactional);
|
||||||
if (NewNode)
|
if (NewNode)
|
||||||
{
|
{
|
||||||
// Set node position
|
// Set node position
|
||||||
|
Reference in New Issue
Block a user