FKismetCompilerContext

Unreal Engine C++ API Reference > Editor > KismetCompiler

Inheritance Hierarchy

References

   
Module KismetCompiler
Header /Engine/Source/Editor/KismetCompiler/Public/KismetCompiler.h
Include #include "KismetCompiler.h"

Syntax

class FKismetCompilerContext : public [FGraphCompilerContext](API\Editor\KismetCompiler\FGraphCompilerContext)  

Variables

Type Name Description
int32 AverageNodeHeight  
int32 AverageNodeWidth Average node size for nodes with no size.
bool bAssignDelegateSignatureFunction Flag to trigger FMulticastDelegateProperty::SignatureFunction resolution in CreateClassVariablesFromBlueprint:
int32: 1 bIsFullCompile  
UBlueprint *... Blueprint  
TMap< UEdGraphN... CallsIntoUbergraph  
FNetNameMapping ClassScopeNetNameMap Map from a name to the number of times it's been 'created' (identical nodes create the same variable names, so they need something appended)
FKismetCompiler... CompileOptions This struct holds the various compilation options, such as which passes to perform, whether to save intermediate results, etc.
UEdGraph * ConsolidatedEventGraph The ubergraph; valid from roughly the start of CreateAndProcessEventGraph.
TMap< UK2Node_C... ConvertibleDelegates  
TSet< FString > CreatedFunctionNames Names of functions created.
TMap< FName, FS... DefaultPropertyValueMap Map from UProperties to default object values, to be fixed up after compilation is complete.
TIndirectArray<... FunctionList List of functions currently allocated.
FOnFunctionList... FunctionListCompiledEvent Event that is broadcast immediately after the function list for this context has been compiled.
TArray< UEdGrap... GeneratedFunctionGraphs Set of function graphs generated for the class layout at compile time
int32 HorizontalNodePadding  
int32 HorizontalSectionPadding Padding.
UScriptStruct &... LinearColorStruct  
TMap< UEdGraphN... MacroGeneratedNodes Map that can be used to find the macro node that spawned a provided node, if any.
int32 MacroRowMaxHeight Maximum height encountered in this row; used to position the next row appropriately.
int32 MacroSpawnX Used to space expanded macro nodes when saving intermediate results.
int32 MacroSpawnY  
int32 MaximumSpawnX  
int32 MinimumSpawnX Maximum bounds of the spawning area.
UBlueprintGener... NewClass  
TMap< TSubclass... NodeHandlers Map from node class to a handler functor.
UObject * OldCDO Data that persists across CompileClassLayout/CompileFunctions calls:
UBlueprintGener... OldClass  
int32 OldGenLinkerIdx  
FLinkerLoad ... OldLinker  
TMap< FName, FP... RepNotifyFunctionMap Map from UProperties to their RepNotify graph.
UScriptStruct &... RotatorStruct  
UEdGraphSchema_... Schema Schema for the graph being compiled.
TMap< UEdGraphN... SourceNodeToExpansionEvent Source pin to latent/delegate entry point.
TMap< UEdGraphP... SourcePinToExpansionEvent  
UBlueprintGener... TargetClass  
TMap< class UTi... TimelineToMemberVariableMap Map of properties created for timelines; to aid in debug data generation.
UScriptStruct &... TransformStruct  
FKismetFunction... UbergraphContext The ubergraph context; valid from the end of CreateAndProcessEventGraph.
UScriptStruct &... VectorStruct  
int32 VerticalSectionPadding  

Constructors

Type Name Description
  FKismetCompilerContext ( UBlueprint* SourceSketch, FCompilerResultsLog& InMessageLog, const FKismetCompilerOptions& InCo... )  

Destructors

Type Name Description
  ~FKismetCompilerContext ()  

Functions

Type Name Description
void AddInterfacesFromBlueprint ( UClass* Class ) Handles adding the implemented interface information to the class
void AdvanceMacroPlacement ( int32 Width, int32 Height ) Advances the macro position tracking.
void AutoAssignNodePosition ( UEdGraphNode* Node )  
void BuildDynamicBindingObjects ( UBlueprintGeneratedClass* Clas... ) Build the dynamic bindings objects used to tie events to delegates at runtime
void CheckConnectionResponse ( const FPinConnectionResponse& Resp..., const UEdGraphNode* Node ) Checks a connection response, and errors if it didn't succeed (not public, users should be using MovePinLinksToIntermediate/CopyPinLinksToIntermediate instead of wrapping their own with this).
void CleanAndSanitizeClass ( UBlueprintGeneratedClass* Clas..., UObject*& OldCDO ) Removes the properties and functions from a class, so that new ones can be created in its place
void Compile () Compile a blueprint into a class and a set of functions
void CompileClassLayout ( EInternalCompilerFlags InternalFlag... ) Compile the class layout of the blueprint
void CompileFunction ( FKismetFunctionContext& Context ) Second phase of compiling a function graph
void CompileFunctions ( EInternalCompilerFlags InternalFlag... ) Compile the functions of the blueprint - must be done after compiling the class layout:
FPinConnecti... CopyPinLinksToIntermediate ( UEdGraphPin& SourcePin, UEdGraphPin& IntermediatePin ) Copies pin links over from the source-pin to the specified intermediate, and validates the result (additionally logs a redirect from the intermediate-pin back to the source so we can back trace for debugging, etc.)
void CopyTermDefaultsToDefaultObject ( UObject* DefaultObject ) Copies default values cached for the terms in the DefaultPropertyValueMap to the final CDO
void CreateAndProcessUbergraph () Merges pages and creates function stubs, etc...
void CreateClassVariablesFromBlueprint () Creates a class variable for each entry in the Blueprint NewVars array
void CreateCommentBlockAroundNodes ( const TArray< UEdGraphNode* > ..., UObject* SourceObject, UEdGraph* TargetGraph, FString CommentText, FLinearColor CommentColor, int32& Out_OffsetX, int32& Out_OffsetY )  
FKismetFunct... CreateFunctionContext () Creates a new function context and adds it to the function list to be processed.
void CreateFunctionList () Creates a list of functions to compile
void CreateFunctionStubForEvent ( UK2Node_Event* Event, UObject* OwnerOfTemporaries ) Create a stub function graph for the event node, and have it invoke the correct point in the ubergraph
void CreateLocalVariablesForFunction ( FKismetFunctionContext& Context, FField**& FunctionProperty... ) Creates the properties on a function that store the local and event graph (if applicable) variables
void CreateParametersForFunction ( FKismetFunctionContext& Context, UFunction* ParameterSignature, FField**& FunctionProperty... ) Create the properties on a function for input/output parameters
void CreatePropertiesFromList ( UStruct* Scope, FField**& PropertyStorageL..., TIndirectArray< FBPTerminal >& Ter..., EPropertyFlags PropertyFlags, bool bPropertiesAreLocal, bool bPropertiesAreParameters ) Creates a property with flags including PropertyFlags in the Scope structure for each entry in the Terms array
UEdGraphSche... CreateSchema ()  
FProperty &#... CreateUserDefinedLocalVariableForFunction ( const FBPVariableDescription& Vari..., UFunction* Function, UBlueprintGeneratedClass* Owni..., FField**& FunctionProperty..., const UEdGraphSchema_K2* Schem..., FCompilerResultsLog& MessageLog ) Helper function for CreateUserDefinedLocalVariablesForFunction and compilation manager's FastGenerateSkeletonClass:
void CreateUserDefinedLocalVariablesForFunction ( FKismetFunctionContext& Context, FField**& FunctionProperty... ) Creates user defined local variables for function
FProperty &#... CreateVariable ( const FName Name, const FEdGraphPinType& Type ) Creates a class variable
void DetermineNodeExecLinks ( UEdGraphNode* SourceNode, TMap< UEdGraphPin*, UEdGraphPi... ) Discovers exec pin links for the sourcenode
void EnsureProperGeneratedClass ( UClass*& TargetClass ) Backwards Compatability: Ensures that the passed in TargetClass is of the proper type (e.g. BlueprintGeneratedClass, AnimBlueprintGeneratedClass), and NULLs the reference if it is not
void ExpandTimelineNodes ( UEdGraph* SourceGraph ) Expand timeline nodes into necessary nodes
void ExpandTunnelsAndMacros ( UEdGraph* SourceGraph ) Expands any macro instances and collapses any tunnels in the nodes of SourceGraph
void ExpansionStep ( UEdGraph* Graph, bool bAllowUbergraphExpansions ) Expands out nodes that need it.
const UK2Nod... FindLocalEntryPoint ( const UFunction* Function ) Scan FunctionList and return Entry point, for matching one
void FinishCompilingClass ( UClass* Class ) Handles final post-compilation setup, flags, creates cached values that would normally be set during deserialization, etc...
void FinishCompilingFunction ( FKismetFunctionContext& Context ) Handles final post-compilation setup, flags, creates cached values that would normally be set during deserialization, etc...
TSharedPtr< ... GetCompilerForBP ( UBlueprint* BP, FCompilerResultsLog& InMessageLog, const FKismetCompilerOptions& InCo... )  
FName GetEventStubFunctionName ( UK2Node_Event* SrcEventNode ) Picks the name to use for an autogenerated event stub
FString GetGuid ( const UEdGraphNode* Node )  
const UEdGra... GetSchema ()  
FName GetUbergraphCallName () Gets the unique name for this context's ExecuteUbergraph function
bool IsNodePure ( const UEdGraphNode* Node ) Determines if a node is pure
void MapExpansionPathToTunnelInstance ( const UEdGraphNode* InnerExpan..., const UEdGraphNode* OuterTunne... ) Maps the nodes in an intermediate tunnel expansion path back to the owning tunnel instance node.
void MergeUbergraphPagesIn ( UEdGraph* Ubergraph ) Merges in any all ubergraph pages into the gathering ubergraph
FPinConnecti... MovePinLinksToIntermediate ( UEdGraphPin& SourcePin, UEdGraphPin& IntermediatePin ) Moves pin links over from the source-pin to the specified intermediate, and validates the result (additionally logs a redirect from the intermediate-pin back to the source so we can back trace for debugging, etc.)
FOnFunctionL... OnFunctionListCompiled () Broadcasts a notification immediately after the function list for this context has been compiled.
void OnNewClassSet ( UBlueprintGeneratedClass* Clas... )  
void OnPostCDOCompiled ( const UObject::FPostCDOCompiledCont... )  
void PostCDOCompiled ( const UObject::FPostCDOCompiledCont... ) Called after the CDO has been generated, allows assignment of cached/derived data:
void PostCompile ()  
void PostCompileDiagnostics () Gives derived classes a chance to emit debug data.
void PostcompileFunction ( FKismetFunctionContext& Context ) Final phase of compiling a function graph; called after all functions have had CompileFunction called
void PostCreateSchema ()  
void PostExpansionStep ( const UEdGraph* Graph ) Gives derived classes a chance to process post-node expansion.
void PreCompile () Gives derived classes a chance to hook up any custom logic.
void PrecompileFunction ( FKismetFunctionContext& Context, EInternalCompilerFlags InternalFlag... ) First phase of compiling a function graph
void PreCompileUpdateBlueprintOnLoad ( UBlueprint* BP ) Used for performing custom patching during stage IX of the compilation during load.
void PrintVerboseInformation ( UClass* Class )  
void PrintVerboseInfoStruct ( UStruct* Struct )  
void ProcessIntermediateTunnelBoundary ( UK2Node_Tunnel* TunnelInput, UK2Node_Tunnel* TunnelOutput ) Processes an intermediate tunnel expansion boundary.
void ProcessOneFunctionGraph ( UEdGraph* SourceGraph, bool bInternalFunction ) Merges macros/subgraphs into the graph and validates it, creating a function list entry if it's reasonable.
void PropagateValuesToCDO ( UObject* NewCDO, UObject* OldCDO ) Non virtual wrapper to encapsulate functions that occur when the CDO is ready for values:
void PruneIsolatedNodes ( UEdGraph* InGraph, bool bInIncludeNodesThatCouldBeExpa... ) Prune isolated nodes given the specified graph
void RegisterClassDelegateProxiesFromBlueprint () Searches the function graphs and ubergraph pages for any delegate proxies, which are then registered with the compiler context.
void RegisterCompilerForBP ( UClass* BPClass, CompilerContextFactoryFunction Fact... )  
void SaveSubObjectsFromCleanAndSanitizeClass ( FSubobjectCollection& SubObjectsTo..., UBlueprintGeneratedClass* Clas... ) Saves any SubObjects on the blueprint that need to survive the clean
void SetCalculatedMetaDataAndFlags ( UFunction* Function, UK2Node_FunctionEntry* EntryNo..., const UEdGraphSchema_K2* Schem... ) Adds metadata for a particular compiled function based on its characteristics
void SetCanEverTick () Function works only if subclass of AActor or UActorComponent.
void SetDefaultInputValueMetaData ( UFunction* Function, const TArray< TSharedPtr< FUserPinI... ) Reflects each pin's user set, default value into the function's metadata (so it can be queried for later by CallFunction nodes, etc.)
void SetNewClass ( UBlueprintGeneratedClass* Clas... ) Function used to assign the new class that will be used by the compiler
void SetPropertyDefaultValue ( const FProperty* PropertyToSet, FString& Value ) Adds a default value entry into the DefaultPropertyValueMap for the property specified
NodeType ... SpawnIntermediateEventNode ( UEdGraphNode* SourceNode, UEdGraphPin* SourcePin, UEdGraph* ParentGraph ) Spawns an intermediate event node associated with the source node (for error purposes)
UEdGraph ... SpawnIntermediateFunctionGraph ( const FString& InDesiredFunctionNa..., const UFunction* InSignature, bool bUseUniqueName ) Spawn an intermediate function graph for this compilation using the specified desired name (and optional signature), which may be modified to make it unique.
NodeType ... SpawnIntermediateNode ( UEdGraphNode* SourceNode, UEdGraph* ParentGraph ) Spawns an intermediate node associated with the source node (for error purposes)
UK2Node_Temp... SpawnInternalVariable ( UEdGraphNode* SourceNode, FName Category, FName SubCategory, UObject* SubcategoryObject, EPinContainerType PinContainerType, const FEdGraphTerminalType& ValueT... )  
void SpawnNewClass ( const FString& NewClassName )  
void TransformNodes ( FKismetFunctionContext& Context ) Performs transformations on specific nodes that require it according to the schema
bool UsePersistentUberGraphFrame ()  
void ValidateClassPropertyDefaults () Ensures that all class reference Properties are legal overrides of the parent class by checking the default value set on any PC_Class variable types.
void ValidateComponentClassOverrides () Ensures that all component class overrides are legal overrides of the parent class
void ValidateFunctionGraphNames () Ensures that all function graphs have valid names for compilation/replication
bool ValidateGeneratedClass ( UBlueprintGeneratedClass* Clas... ) Validates the generated class
void ValidateNoWildcardPinsInGraph ( const UEdGraph* SourceGraph ) Checks if pin types are unresolved (e.g. still wildcards).
void ValidateSelfPinsInGraph ( FKismetFunctionContext& Context ) Checks if self pins are connected.
void ValidateTimelineNames () Ensures that all timelines have valid names for compilation/replication
void ValidateVariableNames () Ensures that all variables have valid names for compilation/replication
void VerifyValidOverrideEvent ( const UEdGraph* Graph ) If a function in the graph cannot be placed as event make sure that it is not.
void VerifyValidOverrideFunction ( const UEdGraph* Graph ) If a function in the graph cannot be overridden make sure that it is not.

Overridden from FGraphCompilerContext

Type Name Description
bool CanIgnoreNode ( const UEdGraphNode* Node ) Can this node be ignored for further processing?
bool PinIsImportantForDependancies ( const UEdGraphPin* Pin ) Does this pin potentially participate in data dependencies?
void PruneIsolatedNodes ( const TArray< UEdGraphNode* > ..., TArray< UEdGraphNode* >& Grap... ) Prunes any nodes that weren't visited from the graph, printing out a warning
bool ShouldForceKeepNode ( const UEdGraphNode* Node ) Should this node be kept even if it's not reached?
void ValidateLink ( const UEdGraphPin* PinA, const UEdGraphPin* PinB ) Validates that the interconnection between two pins is schema compatible
void ValidateNode ( const UEdGraphNode* Node ) Validates that the node is schema compatible
void ValidatePin ( const UEdGraphPin* Pin ) Validate that the wiring for a single pin is schema compatible

Classes

Type Name Description
Public struct FDelegateInfo  
Public struct FNameParameterHelper  
Public class FOnFunctionListCompiled  
Protected struct FSubobjectCollection  

Typedefs

Name Description
Super  

Constants

Name Description
OnPostCompile  
OnPreCompile  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library