FKismetEditorUtilities

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Kismet2/KismetEditorUtilities.h

Include

#include "Kismet2/KismetEditorUtilities.h"

Syntax

class FKismetEditorUtilities

Constructors

No constructors are accessible with public or protected access.

Functions

Name Description

Public function Static

void

 

AddActorsToBlueprint

(
    UBlueprint* Blueprint,
    const TArray< AActor* >& Acto...,
    const FAddActorsToBlueprintParams&...
)

Take a list of actors and add them to a blueprint as Child Actor Components

Public function Static

void

 

AddComponentsToBlueprint

(
    UBlueprint* Blueprint,
    const TArray< UActorComponent*...,
    const FAddComponentsToBlueprintPara...
)

Take a list of components that belong to a single Actor and add them to a blueprint as SCSNodes

Public function Static

UK2Node_Even...

 

AddDefaultEventNode

(
    UBlueprint* InBlueprint,
    UEdGraph* InGraph,
    FName InEventName,
    UClass* InEventClass,
    int32& InOutNodePosY
)

Add a default event node to the graph, this node will also be in a disabled state and will spawn with a call to it's parent if available

Public function Static

void

 

AddInterfaceTags

(
    const UBlueprint* Blueprint,
    TArray< UObject::FAssetRegistryTag ...
)

Add information about any interfaces that have been implemented to the OutTags array

Public function Static

void

 

AddLevelScriptEventOptionsForActor

(
    UToolMenu* Menu,
    TWeakObjectPtr< AActor > ActorPtr,
    bool bExistingEvents,
    bool bNewEvents,
    bool bOnlyEventName
)

It lists bounded LevelScriptEvents for given actor

Public function Static

void

 

AddToSelection

(
    const UEdGraph* Graph,
    UEdGraphNode* InNode
)

Add InNode to selection of editor

Public function Static

bool

 

AnyBoundLevelScriptEventForActor

(
    AActor* Actor,
    bool bCouldAddAny
)

If bCouldAddAny is true it returns if any event can be bound in LevelScript for given Actor else it returns if there exists any event in level script bound with the actor

Public function Static

void

 

BringKismetToFocusAttentionOnObject

(
    const UObject* ObjectToFocusOn,
    bool bRequestRename
)

Open a Kismet window, focusing on the specified object (either a node, or a graph).

Public function Static

void

 

BringKismetToFocusAttentionOnPin

(
    const UEdGraphPin* PinToFocusO...
)

Open a Kismet window, focusing on the specified pin.

Public function Static

bool

 

CanBlueprintImplementInterface

(
    UBlueprint const* Blueprint,
    UClass const* Class
)

Checks to see if a blueprint can implement the specified class as an interface

Public function Static

bool

 

CanCreateBlueprintOfClass

(
    const UClass* Class
)

Public function Static

bool

 

CanPasteNodes

(
    const UEdGraph* Graph
)

Can we paste to this graph?

Public function Static

void

 

CompileBlueprint

(
    UBlueprint* BlueprintObj,
    EBlueprintCompileOptions CompileFla...,
    FCompilerResultsLog* pResults
)

Tries to compile a blueprint, updating any actors in the editor who are using the old class, etc...

Public function Static

void

 

ConformBlueprintFlagsAndComponents

(
    UBlueprint* BlueprintObj
)

Tries to make sure that a data-only blueprint is conformed to its native parent, in case any native class flags have changed

Public function Static

UBlueprint &...

 

CreateBlueprint

(
    UClass* ParentClass,
    UObject* Outer,
    const FName NewBPName,
    enum EBlueprintType BlueprintType,
    TSubclassOf< UBlueprint > Blueprint...,
    TSubclassOf< UBlueprintGeneratedCla...,
    FName CallingContext
)

Create a new Blueprint and initialize it to a valid state.

Public function Static

UBlueprint &...

 

CreateBlueprintFromActor

(
    const FName BlueprintName,
    UObject* Outer,
    AActor* Actor,
    const FCreateBlueprintFromActorPara...
)

Take an Actor and generate a blueprint based on it. Uses the Actors type as the parent class.

Public function Static

UBlueprint &...

 

CreateBlueprintFromActor

(
    const FString& Path,
    AActor* Actor,
    const FCreateBlueprintFromActorPara...
)

Take an Actor and generate a blueprint based on it. Uses the Actors type as the parent class.

Public function Static

UBlueprint &...

 

CreateBlueprintFromActors

(
    const FName BlueprintName,
    UPackage* Package,
    const FCreateBlueprintFromActorsPar...
)

Take a collection of Actors and generate a blueprint based on it

Public function Static

UBlueprint &...

 

CreateBlueprintFromActors

(
    const FString& Path,
    const FCreateBlueprintFromActorsPar...
)

Take a collection of Actors and generate a blueprint based on it

Public function Static

UBlueprint &...

 

CreateBlueprintFromClass

(
    FText InWindowTitle,
    UClass* InParentClass,
    FString NewNameSuggestion
)

Create a new Blueprint from the supplied base class.

Public function Static

AActor *

 

CreateBlueprintInstanceFromSelection

(
    UBlueprint* Blueprint,
    const TArray< AActor* >& Sele...,
    const FVector& Location,
    const FRotator& Rotator,
    AActor* AttachParent
)

Creates a new blueprint instance and replaces the provided actor list with the new actor

Public function Static

UBlueprint &...

 

CreateBlueprintUsingAsset

(
    UObject* Asset,
    bool bOpenInEditor
)

Create a new Actor Blueprint and add the supplied asset to it.

Public function Static

void

 

CreateDefaultEventGraphs

(
    UBlueprint* Blueprint
)

Create the correct event graphs for this blueprint

Public function Static

void

 

CreateNewBoundEventForActor

(
    AActor* Actor,
    FName EventName
)

Create a new event node in the level script blueprint, for the supplied Actor and event (multicast delegate property) name

Public function Static

void

 

CreateNewBoundEventForClass

(
    UClass* Class,
    FName EventName,
    UBlueprint* Blueprint,
    FObjectProperty* ComponentProp...
)

Create a new event node in the blueprint, for the supplied class, event name and blueprint

Public function Static

void

 

CreateNewBoundEventForComponent

(
    UObject* Component,
    FName EventName,
    UBlueprint* Blueprint,
    FObjectProperty* ComponentProp...
)

Create a new event node in the blueprint, for the supplied component, event name and blueprint

Public function Static

void

 

FindAllBoundEventsForComponent

(
    const UBlueprint* Blueprint,
    FName PropertyName,
    TArray< UK2Node_ComponentBoundEvent...
)

Finds all bound component nodes for the given property on this blueprint

Public function Static

const UK2Nod...

 

FindBoundEventForActor

(
    AActor const* Actor,
    FName EventName
)

Find the event node for this actor with the given event name

Public function Static

const UK2Nod...

 

FindBoundEventForComponent

(
    const UBlueprint* Blueprint,
    FName EventName,
    FName PropertyName
)

Find the event node for the component property with the given event name

Public function Static

bool

 

GenerateBlueprintSkeleton

(
    UBlueprint* BlueprintObj,
    bool bForceRegeneration
)

Generates a blueprint skeleton only.

Public function Static

bool

 

GetBoundsForSelectedNodes

(
    const UBlueprint* Blueprint,
    FSlateRect& Rect,
    float Padding
)

Attempt to get the bounds for currently selected nodes

Public function Static

TSharedPtr< ...

 

GetIBlueprintEditorForObject

(
    const UObject* ObjectToFocusOn,
    bool bOpenEditor
)

Get IBlueprintEditor for given object, if it exists

Public function Static

void

 

GetInformationOnMacro

(
    UEdGraph* MacroGraph,
    UK2Node_Tunnel*& EntryNode,
    UK2Node_Tunnel*& ExitNode,
    bool& bIsPure
)

Return information about the given macro graph

Public function Static

int32

 

GetNumberOfSelectedNodes

(
    const UBlueprint* Blueprint
)

Public function Static

UBlueprint &...

 

HarvestBlueprintFromActors

(
    const FName BlueprintName,
    UPackage* Package,
    const TArray< AActor* >& Acto...,
    const FHarvestBlueprintFromActorsPa...
)

Take a list of Actors and generate a blueprint by harvesting the components they have.

Public function Static

UBlueprint &...

 

HarvestBlueprintFromActors

(
    const FString& Path,
    const TArray< AActor* >& Acto...,
    const FHarvestBlueprintFromActorsPa...
)

Take a list of Actors and generate a blueprint by harvesting the components they have.

Public function Static

void

 

IdentifyRootActors

(
    const TArray< AActor* >& Acto...,
    TArray< AActor* >& RootActors,
    TMap< AActor*, TArray< AActor ...
)

Given an array of Actors, identifies which of those Actors are roots of attachment hierarchies (and implicitly which are attached to another actor in the array) Optionally will also populate an attachment map that indicates which actors in the array are attached to each other actor (potentially indirectly) For example if A is attached to B is attached to C and E is attached to D, and A, C, and E are in the Actors array, C and E will be in the RootActors, and the AttachmentMap will indicate that C has A as an attachment

Public function Static

bool

 

IsActorValidForLevelScript

(
    const AActor* Actor
)

Whether or not the specified actor is a valid target for bound events

Public function Static

bool

 

IsClassABlueprintInterface

(
    const UClass* Class
)

Checks to see if a given class implements a blueprint-accesable interface

Public function Static

bool

 

IsClassABlueprintMacroLibrary

(
    const UClass* Class
)

Check to see if a given class is a blueprint macro library

Public function Static

bool

 

IsClassABlueprintSkeleton

(
    const UClass* Class
)

Check to see if a given class is blueprint skeleton class.

Public function Static

bool

 

IsClassABlueprintSpawnableComponent

(
    const UClass* Class
)

Check to see if a given class is blueprint spawnable component class.

Public function Static

bool

 

IsReferencedByUndoBuffer

(
    UBlueprint* Blueprint
)

Determines if the specified blueprint is referenced currently in the undo buffer.

Public function Static

void

 

PasteNodesHere

(
    UEdGraph* Graph,
    const FVector2D& Location
)

Perform paste on graph, at location

Public function Static

bool

 

PropertyHasBoundEvents

(
    const UBlueprint* Blueprint,
    FName PropertyName
)

Returns true if the given property name has any bound component events in any blueprint graphs

Public function Static

void

 

RegisterAutoGeneratedDefaultEvent

(
    void* InOwner,
    UClass* InTargetClass,
    FName InEventName
)

Will add an event to the list of default event nodes to be auto-generated for the class or a child of the class

Public function Static

void

 

RegisterOnBlueprintCreatedCallback

(
    void* InOwner,
    UClass* InTargetClass,
    FOnBlueprintCreated InOnBlueprintCr...
)

Will add an event to a list of callbacks to occur post Blueprint creation if the Blueprint is a child of the class

Public function Static

UBlueprint &...

 

ReplaceBlueprint

(
    UBlueprint* Target,
    UBlueprint const* Replacement
)

Unloads the specified Blueprint (marking it pending-kill, and removing it from its outer package).

Public function Static

void

 

ShowActorReferencesInLevelScript

(
    const AActor* Actor
)

Open level script kismet window and show any references to the selected actor

Public function Static

void

 

StripExternalComponents

(
    UBlueprint* Blueprint
)

Run over the components in the blueprint, and then remove any that fall outside this blueprint's scope (e.g. components brought over after reparenting from another class)

Public function Static

void

 

UnregisterAutoBlueprintNodeCreation

(
    void* InOwner
)

Unregisters a class from having AutoGeneratedDefaultEvent nodes or callbacks for OnBlueprintCreated

Public function Static

void

 

UpgradeCosmeticallyStaleBlueprint

(
    UBlueprint* Blueprint
)

Upgrade any cosmetically stale information in a blueprint (done when edited instead of PostLoad to make certain operations easier)

Classes

Name

Description

Public struct

FAddActorsToBlueprintParams

Parameter struct for customizing calls to AddActorsToBlueprint

Public struct

FAddComponentsToBlueprintParams

Parameter struct for customizing calls to AddComponentsToBlueprint

Public struct

FCreateBlueprintFromActorParams

Parameter struct for customizing calls to CreateBlueprintFromActor

Public struct

FCreateBlueprintFromActorsParams

Parameter struct for customizing calls to CreateBlueprintFromActors

Public struct

FDefaultEventNodeData

Manages the TargetClass and EventName to use for spawning default "ghost" nodes in a new Blueprint

Public struct

FHarvestBlueprintFromActorsParams

Parameter struct for customizing calls to CreateBlueprintFromActor

Public struct

FOnBlueprintCreatedData

Manages the TargetClass and EventName to use for spawning default "ghost" nodes in a new Blueprint

Enums

Name

Description

Public enum

EAddComponentToBPHarvestMode

Typedefs

Name

Description

FOnBlueprintCreated

Event that's broadcast anytime a Blueprint is created

FOnBlueprintUnloaded

Event that's broadcast anytime a blueprint is unloaded, and becomes invalid (with calls to ReplaceBlueprint(), for example).

Constants

Name

Description

AutoGeneratedDefaultEventsMap

Mapping of classes to names of Events that should be automatically spawned

bIsListeningForClicksOnKismetLog

Stores whether we are already listening for kismet clicks

OnBlueprintCreatedCallbacks

Mapping of classes to delegate callbacks when a Blueprint is created, occurs post Event node creation

OnBlueprintUnloaded

TrackedBlueprintParentList

List of blueprint parent class names cached by IsTrackedBlueprintParent()

Deprecated Functions

Name Description

Public function Static

void

 

AddComponentsToBlueprint

(
    UBlueprint* Blueprint,
    const TArray< UActorComponent*...,
    bool bHarvesting,
    USCS_Node* OptionalNewRootNode,
    bool bKeepMobility
)

Use version that specifies harvest mode via enum instead of boolean

Public function Static

void

 

AddComponentsToBlueprint

(
    UBlueprint* Blueprint,
    const TArray< UActorComponent*...,
    EAddComponentToBPHarvestMode Harves...,
    USCS_Node* OptionalNewRootNode,
    bool bKeepMobility
)

Use version that uses parameter struct instead of individual parameters

Public function Static

UBlueprint &...

 

CreateBlueprintFromActor

(
    const FName BlueprintName,
    UObject* Outer,
    AActor* Actor,
    bool bReplaceInWorld,
    bool bKeepMobility,
    UClass* ParentClassOverride,
    bool bOpenInEditor
)

Use version that passes parameters via parameter struct

Public function Static

UBlueprint &...

 

CreateBlueprintFromActor

(
    const FString& Path,
    AActor* Actor,
    bool bReplaceActor,
    bool bKeepMobility,
    UClass* ParentClassOverride,
    bool bOpenInEditor
)

Use version that passes parameters via parameter struct

Public function Static

UBlueprint &...

 

CreateBlueprintFromActors

(
    const FName BlueprintName,
    UPackage* Package,
    const TArray< AActor* >& Acto...,
    bool bReplaceInWorld,
    UClass* ParentClass,
    bool bOpenInEditor
)

Use version that passes parameters via parameter struct

Public function Static

UBlueprint &...

 

CreateBlueprintFromActors

(
    const FString& Path,
    const TArray< AActor* >& Acto...,
    bool bReplaceActor,
    UClass* ParentClass,
    bool bOpenInEditor
)

Use version that passes parameters via parameter struct

Public function Static

UBlueprint &...

 

HarvestBlueprintFromActors

(
    const FName BlueprintName,
    UPackage* Package,
    const TArray< AActor* >& Acto...,
    bool bReplaceInWorld,
    UClass* ParentClass
)

Use version that passes parameters via parameter struct

Public function Static

UBlueprint &...

 

HarvestBlueprintFromActors

(
    const FString& Path,
    const TArray< AActor* >& Acto...,
    bool bReplaceInWorld,
    UClass* ParentClass
)

Use version that passes parameters via parameter struct

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss