Unloading Instanced Levels
I am creating streaming level instances for a semi-procedural dungeon system (using the Get Streaming Level + Create Instance nodes), but I can't figure out how to unload them once I am done with them.
The Unload Streaming Level node takes a level path input, so I imagine it will unload the source level that the instances are based on, therefore unloading all instances of that level, which is not what I want.
The Create Instance node has return value output, but no way to promote it as a variable, so I can't refer to it later on once I need to unload that instance.
Does such a feature exist, and if not, what is the ETA or workaround for it?
asked Apr 03 '15 at 08:00 PM in Blueprint Scripting
When you call CreateInstance you provide a unique level name to it. You can use that name later to find created streaming level instance using GetStreamingLevel node. And unload it by setting ShouldBeLoaded to false. It should unload only level instance with that name without affecting other copies. However there is no way now to delete StreamingLevel instance from blueprints, but I think it not really needed.
answered Apr 04 '15 at 05:54 AM
Instead of using create Instance level, use Create Instance. This is an old Kismet function left inside the engine from UDK3.
target is streaming level, give it a unique name ( like appending a random integer to the level name. When you set should be loaded and should be visible to true, it will load on the level, and unload if you set them false.
Important thing is, this node won't be visible unless you turn of context-sensitive on bp node search.
Also, this note will always give a warning since it is so outdated but it was still working on 4.21 with no problem. Remember that because of that warning bp nativization may or may now work, I never tested it with this node.
answered May 16 '19 at 07:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here