Navigation
API > API/Plugins > API/Plugins/EditorScriptingUtilities
Utility class to do most of the common functionalities in the World Editor. The editor should not be in play in editor mode.
| Name | UEditorLevelLibrary |
| Type | class |
| Header File | /Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h |
| Include Path | #include "EditorLevelLibrary.h" |
Syntax
UCLASS (MinimalAPI)
class UEditorLevelLibrary : public UBlueprintFunctionLibrary
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBlueprintFunctionLibrary → UEditorLevelLibrary
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ClearActorSelectionSet() |
Remove all actors from the selection set | EditorLevelLibrary.h |
|
static TArray< class AActor * > ConvertActors
(
const TArray< class AActor* >& Actors, |
Replace in the level all Actors provided with a new actor of type ActorClass. | EditorLevelLibrary.h |
|
static bool CreateProxyMeshActor
(
const TArray< class AStaticMeshActor* >& ActorsToMerge, |
Build a proxy mesh actor that can replace a set of mesh actors. | EditorLevelLibrary.h |
|
static bool CreateProxyMeshActor
(
const TArray< class AStaticMeshActor* >& ActorsToMerge, |
Build a proxy mesh actor that can replace a set of mesh actors. | EditorLevelLibrary.h | |
static bool DestroyActor
(
AActor* ActorToDestroy |
Destroy the actor from the world editor. Notify the Editor that the actor got destroyed. | EditorLevelLibrary.h |
|
static void EditorEndPlay() |
EditorLevelLibrary.h |
|
|
static void EditorInvalidateViewports() |
EditorLevelLibrary.h |
|
|
static void EditorPlaySimulate() |
EditorLevelLibrary.h |
|
|
static void EditorSetGameView
(
bool bGameView |
EditorLevelLibrary.h |
|
|
static void EjectPilotLevelActor() |
EditorLevelLibrary.h |
|
|
| Attempts to find the actor specified by PathToActor in the current editor world | EditorLevelLibrary.h |
|
|
static TArray< class AActor * > GetAllLevelActors () |
Find all loaded Actors in the world editor. | EditorLevelLibrary.h |
|
static TArray< class UActorComponent * > GetAllLevelActorsComponents () |
Find all loaded ActorComponent own by an actor in the world editor. | EditorLevelLibrary.h |
|
static UWorld * GetEditorWorld () |
Find the World in the world editor. | EditorLevelLibrary.h |
|
static UWorld * GetGameWorld() |
EditorLevelLibrary.h |
|
|
static bool GetLevelViewportCameraInfo
(
FVector& CameraLocation, |
Gets information about the camera position for the primary level editor viewport. | EditorLevelLibrary.h |
|
| EditorLevelLibrary.h |
|
||
static TArray< class AActor * > GetSelectedLevelActors () |
Find all loaded Actors that are selected in the world editor. | EditorLevelLibrary.h |
|
static AActor * JoinStaticMeshActors
(
const TArray< class AStaticMeshActor* >& ActorsToJoin, |
The functions below are BP exposed copies of functions that use deprecated structs, updated to the new structs in StaticMeshEditorSubsytem The old structs redirect to the new ones, so this makes blueprints that use the old structs still work The old functions are still available as an overload, which makes old code that uses them compatible Create a new Actor in the level that contains a duplicate of all the Actors Static Meshes Component. | EditorLevelLibrary.h |
|
static AActor * JoinStaticMeshActors
(
const TArray< class AStaticMeshActor* >& ActorsToJoin, |
Create a new Actor in the level that contains a duplicate of all the Actors Static Meshes Component. | EditorLevelLibrary.h | |
static bool LoadLevel
(
const FString& AssetPath |
Close the current Persistent Level (without saving it). Loads the specified level. | EditorLevelLibrary.h |
|
static bool MergeStaticMeshActors
(
const TArray< class AStaticMeshActor* >& ActorsToMerge, |
Merge the meshes into a unique mesh with the provided StaticMeshActors. | EditorLevelLibrary.h |
|
static bool MergeStaticMeshActors
(
const TArray< class AStaticMeshActor* >& ActorsToMerge, |
Merge the meshes into a unique mesh with the provided StaticMeshActors. | EditorLevelLibrary.h | |
| Close the current Persistent Level (without saving it). | EditorLevelLibrary.h |
|
|
static bool NewLevelFromTemplate
(
const FString& AssetPath, |
Close the current Persistent Level (without saving it). | EditorLevelLibrary.h |
|
static void PilotLevelActor
(
AActor* ActorToPilot |
EditorLevelLibrary.h |
|
|
static void ReplaceMeshComponentsMaterials
(
const TArray< class UMeshComponent* >& MeshComponents, |
Find the references of the material MaterialToReplaced on all the MeshComponents provided and replace it by NewMaterial. | EditorLevelLibrary.h |
|
static void ReplaceMeshComponentsMaterialsOnActors
(
const TArray< class AActor* >& Actors, |
Find the references of the material MaterialToReplaced on all the MeshComponents of all the Actors provided and replace it by NewMaterial. | EditorLevelLibrary.h |
|
static void ReplaceMeshComponentsMeshes
(
const TArray< class UStaticMeshComponent* >& MeshComponents, |
Find the references of the mesh MeshToBeReplaced on all the MeshComponents provided and replace it by NewMesh. | EditorLevelLibrary.h |
|
static void ReplaceMeshComponentsMeshesOnActors
(
const TArray< class AActor* >& Actors, |
Find the references of the mesh MeshToBeReplaced on all the MeshComponents of all the Actors provided and replace it by NewMesh. | EditorLevelLibrary.h |
|
static void ReplaceSelectedActors
(
const FString& InAssetPath |
Replaces the selected Actors with the same number of a different kind of Actor using the specified factory to spawn the new Actors note that only Location, Rotation, Drawscale, Drawscale3D, Tag, and Group are copied from the old Actors | EditorLevelLibrary.h |
|
static bool SaveAllDirtyLevels() |
Saves all Level currently loaded by the World Editor. | EditorLevelLibrary.h |
|
static bool SaveCurrentLevel() |
Saves the specified Level. Must already be saved at lease once to have a valid path. | EditorLevelLibrary.h |
|
static void SelectNothing() |
Selects nothing in the editor (another way to clear the selection) | EditorLevelLibrary.h |
|
static void SetActorSelectionState
(
AActor* Actor, |
Set the selection state for the selected actor | EditorLevelLibrary.h |
|
static bool SetCurrentLevelByName
(
FName LevelName |
Set the current level used by the world editor. | EditorLevelLibrary.h |
|
static void SetLevelViewportCameraInfo
(
FVector CameraLocation, |
Sets information about the camera position for the primary level editor viewport. | EditorLevelLibrary.h |
|
static void SetSelectedLevelActors
(
const TArray< class AActor* >& ActorsToSelect |
Clear the current world editor selection and select the provided actors. | EditorLevelLibrary.h |
|
static AActor * SpawnActorFromClass
(
TSubclassOf< class AActor > ActorClass, |
Create an actor and place it in the world editor. | EditorLevelLibrary.h |
|
static AActor * SpawnActorFromObject
(
UObject* ObjectToUse, |
Create an actor and place it in the world editor. | EditorLevelLibrary.h |
|