You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Changed the K2Node_Message to expand and attempt to cast the incoming reference as a ULevelStreaming reference, get the level script actor, and cast that to the interface. Exposed for Blueprints (BP internal use only) ULevelStreaming::GetLevelScriptActor All levels can now have a BP interface added to them. #jira UE-16706 - Implement Level Blueprint Interface Communication [CL 2597586 by Michael Schoell in Main branch]
50 lines
2.2 KiB
C++
50 lines
2.2 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
#include "K2Node_CallFunction.h"
|
|
#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTitleTextTable
|
|
#include "K2Node_Message.generated.h"
|
|
|
|
UCLASS(MinimalAPI)
|
|
class UK2Node_Message : public UK2Node_CallFunction
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
|
// Begin UEdGraphNode interface.
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
|
virtual void AllocateDefaultPins() override;
|
|
// End UEdGraphNode interface.
|
|
|
|
// Begin K2Node interface.
|
|
virtual bool IsNodeSafeToIgnore() const override { return true; }
|
|
virtual class FNodeHandlingFunctor* CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const override;
|
|
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override;
|
|
virtual FName GetCornerIcon() const override;
|
|
virtual bool IsNodePure() const override { return false; }
|
|
// End K2Node interface.
|
|
|
|
// Begin K2Node_CallFunction Interface.
|
|
virtual UEdGraphPin* CreateSelfPin(const UFunction* Function) override;
|
|
|
|
protected:
|
|
/**
|
|
* Helper function for expand node to expand the message to handle the case that a ULevelStreaming may be passed which needs to have its LevelScriptActor pulled out
|
|
*
|
|
* @param InCompilerContext CompilerContext from ExpandNode
|
|
* @param InSourceGraph Graph that the node are expanding from
|
|
* @param InStartingExecPin Exec pin that connects to the message node, to correctly be mapped into the exec pins of the expanded nodes
|
|
* @param InMessageSelfPin The message node's self pin, to correctly be mapped into the object pins of the expanded nodes
|
|
* @param InCastToInterfaceNode Previously generated node to cast to the message's interface, to be wired into the expanded nodes
|
|
*/
|
|
void ExpandLevelStreamingHandlers(class FKismetCompilerContext& InCompilerContext, UEdGraph* InSourceGraph, class UEdGraphPin* InStartingExecPin, class UEdGraphPin* InMessageSelfPin, class UK2Node_DynamicCast* InCastToInterfaceNode);
|
|
|
|
virtual void EnsureFunctionIsInBlueprint() override;
|
|
// End K2Node_CallFunction Interface.
|
|
|
|
/** Constructing FText strings can be costly, so we cache the node's title */
|
|
FNodeTitleTextTable CachedNodeTitles;
|
|
};
|
|
|