FKismetCompilerUtilities

This is a loose collection of utilities used when 'compiling' a new [UClass](API\Runtime\CoreUObject\UObject\UClass) from a K2 graph.

Unreal Engine C++ API Reference > Editor > KismetCompiler

References

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

Syntax

class FKismetCompilerUtilities  

Remarks

This is a loose collection of utilities used when 'compiling' a new UClass from a K2 graph.

Functions

Type Name Description
bool CheckFunctionCompiledStatementsThreadSafety ( const UEdGraphNode* InNode, const UEdGraph* InSourceGraph, const TArray< FBlueprintCompiledSta..., FCompilerResultsLog& InMessageLog, bool InbEmitErrors, TSet< const FBPTerminal* >... ) Helper function used by CheckFunctionThreadSafety. Split out to allow the ability to examine individual compiled statement lists (e.g. for the ubergraph)
bool CheckFunctionThreadSafety ( const FKismetFunctionContext& InCo..., FCompilerResultsLog& InMessageLog, bool InbEmitErrors ) Check the passed-in function to verify its thread safety. This makes sure that it only uses/calls thread-safe functions/nodes.
FFieldVarian... CheckPropertyNameOnScope ( UStruct* Scope, const FName& PropertyName ) Checks that the property name isn't taken in the given scope (used by CreatePropertyOnScope())
void CompileDefaultProperties ( UClass* Class )  
void ConsignToOblivion ( UClass* OldClass, bool bForceNoResetLoaders ) Rename a class and it's CDO into the transient package, and clear RF_Public on both of them.
void CreateObjectAssignmentStatement ( FKismetFunctionContext& Context, UEdGraphNode* Node, FBPTerminal* SrcTerm, FBPTerminal* DstTerm, UEdGraphPin* DstPin ) Create Kismet assignment statement with proper object <-> interface cast
FProperty &#... CreatePrimitiveProperty ( FFieldVariant PropertyScope, const FName& ValidatedPropertyName, const FName& PinCategory, const FName& PinSubCategory, UObject* PinSubCategoryObject, UClass* SelfClass, bool bIsWeakPointer, const UEdGraphSchema_K2* Schem..., FCompilerResultsLog& MessageLog ) Helper function for creating property for primitive types.
FProperty &#... CreatePropertyOnScope ( UStruct* Scope, const FName& PropertyName, const FEdGraphPinType& Type, UClass* SelfClass, EPropertyFlags PropertyFlags, const UEdGraphSchema_K2* Schem..., FCompilerResultsLog& MessageLog, UEdGraphPin* SourcePin ) Creates a property named PropertyName of type PropertyType in the Scope or returns NULL if the type is unknown, but does not link that property in
void DetectValuesReturnedByRef ( const UFunction* Func, const UK2Node* Node, FCompilerResultsLog& MessageLog ) Generate an error for non-const output parameters
ConvertibleS... DoSignaturesHaveConvertibleFloatTypes ( const UFunction* SourceFunctio..., const UFunction* OtherFunction ) Similar to UFunction::IsSignatureCompatibleWith, but also checks if the function signatures are convertible.
FProperty &#... FindNamedPropertyInScope ( UStruct* Scope, FName PropertyName, bool& bIsSparseProperty, const bool bAllowDeprecated ) Finds a property by name, starting in the specified scope, returning NULL if it's not found.
const UFunct... FindOverriddenImplementableEvent ( const FName& EventName, const UClass* Class ) Return function, that overrides BlueprintImplementableEvent with given name in given class (super-classes are not considered)
FProperty &#... FindPropertyInScope ( UStruct* Scope, UEdGraphPin* Pin, FCompilerResultsLog& MessageLog, const UEdGraphSchema_K2* Schem..., UClass* SelfClass, bool& bIsSparseProperty ) Finds a property by name, starting in the specified scope; Validates property type and returns NULL along with emitting an error if there is a mismatch.
TArray< TSet... FindUnsortedSeparateExecutionGroups ( const TArray< UEdGraphNode* > ... ) Find groups of nodes, that can be executed separately.
UEdGraphPin ... GenerateAssignmentNodes ( FKismetCompilerContext& CompilerCo..., UEdGraph* SourceGraph, UK2Node_CallFunction* CallBegi..., UEdGraphNode* SpawnNode, UEdGraphPin* CallBeginResult, const UClass* ForClass ) Create 'set var by name' nodes and hook them up - used to set values when components are added or actor are created at run time.
TTuple< UEdG... GenerateBroadcastFieldNotificationNode ( FKismetCompilerContext& CompilerCo..., UEdGraph* SourceGraph, UEdGraphNode* SourceNode, FProperty* Property ) Create node to broadcast a FieldNotification value changed
TTuple< UEdG... GenerateFieldNotificationSetNode ( FKismetCompilerContext& CompilerCo..., UEdGraph* SourceGraph, UEdGraphNode* SourceNode, UEdGraphPin* SelfPin, FProperty* VariableProperty, const FMemberReference& VariableRe..., bool bHasLocalRepNotify, bool bShouldFlushDormancyOnSet, bool bIsNetProperty ) Create node that replace regular setter and use the SetPropertyValueAndBroadcast.
bool IsIntermediateFunctionGraphTrivial ( FName FunctionName, const UEdGraph* FunctionGraph )  
bool IsMissingMemberPotentiallyLoading ( const UBlueprint* SelfBlueprin..., const UStruct* MemberOwner ) Intended to avoid errors that come from checking for external member (function, variable, etc.) dependencies.
bool IsPropertyUsesFieldNotificationSetValueAndBroadcast ( const FProperty* Property )  
bool IsStatementReducible ( EKismetCompiledStatementType Statem... )  
bool IsTypeCompatibleWithProperty ( UEdGraphPin* SourcePin, FProperty* Property, FCompilerResultsLog& MessageLog, const UEdGraphSchema_K2* Schem..., UClass* SelfClass ) Tests to see if a pin is schema compatible with a property.
void LinkAddedProperty ( UStruct* Structure, FProperty* NewProperty )  
void RemoveObjectRedirectorIfPresent ( UObject* Package, const FString& ClassName, UObject* ObjectBeingMovedIn )  
void UpdateBlueprintSkeletonStubClassAfterFailedCompile ( UBlueprint* Blueprint, UClass* StubClass )  
void UpdateDependentBlueprints ( UBlueprint* BP ) Add this BP to any BPs that it in
void ValidateEnumProperties ( const UObject* DefaultObject, FCompilerResultsLog& MessageLog ) Checks if enum variables from given object store proper indexes
void ValidateProperEndExecutionPath ( FKismetFunctionContext& Context ) Checks if each execution path ends with a Return node
bool ValidateSelfCompatibility ( const UEdGraphPin* Pin, FKismetFunctionContext& Context ) Checks if the specified pin can default to self

Constants

Name Description
ConsignToOblivionCounter Counter to ensure unique names in the transient package, to avoid GC collection issues with classes and their CDOs

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library