FLevelInstanceEditing
Level Instances of an open One-File-Per-Actor level, edited live (UE's Level Instance actor): placing, moving or removing an instance writes the level's World package as before and also brings the open scene to what the next open of the level would assemble, so the viewport shows the change at once instead of after a reload. The instance's actors carry ids derived from the instance name (FExternalActorFiles::LevelInstanceEntityId), which is how they are found again; Save never writes them into this level's own actor files.
- Module
- Game
- Header
#include "Scene/LevelInstanceEditing.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
bool | Add | |
bool | Update | |
bool | Remove | |
int32_t | CountActors | How many of the instance's actors are in the scene now. |
int32_t | SpawnTransient | Places an instance's actors in the scene without writing any file — a level put together at play from module levels. |
int32_t | DespawnTransient |
Function details
Add
static bool Add(Scene& scene, const FLevelInstanceDesc& instance, std::string* error = nullptr)Update
static bool Update(Scene& scene, const FLevelInstanceDesc& instance, std::string* error = nullptr)Remove
static bool Remove(Scene& scene, const std::string& name, std::string* error = nullptr)CountActors
static int32_t CountActors(Scene& scene, const FLevelInstanceDesc& instance)How many of the instance's actors are in the scene now.
SpawnTransient
static int32_t SpawnTransient(Scene& scene, const FLevelInstanceDesc& instance, std::string* error = nullptr)Places an instance's actors in the scene without writing any file — a level put together at play from module levels. Returns how many actors joined, -1 when the instanced level could not be assembled. Ids derive from the instance name alone, so two machines placing one name agree.
DespawnTransient
static int32_t DespawnTransient(Scene& scene, const FLevelInstanceDesc& instance)