Spawning blueprint into specific folder in scene outliner

is it possible to spawn actors and have them reside in a specific folder in the scene outliner, rather than all in one big list?

3 Likes

Hi,

to set the folder in the scene outline there is setFolderPath(FName path) in AActor’s editor specific functions.
To add an instance of AInputSystem in the outline under /SpawnedActors/System look at the following example:

AActor* spawnedActor = GetWorld()->SpawnActor(AInputSystem::StaticClass());
#if WITH_EDITOR
    spawnedActor->SetFolderPath("/SpawnedActors/Systems");
#endif

Note: The function is only valid if you build one of the editor builds,not in the shipping build

6 Likes

Slash at the beginning will cause a creation of a second folder named SpawnedActors if one was already created by hand in an editor.

This should be:
spawnedActor->SetFolderPath(“SpawnedActors/Systems”);

6 Likes