x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to dynamically load umaps (C++)

[Creating a umap and loading it on the fly seems to be a good way to manage loading and unloading collections of objects]

It took me a while messing around with this to get it, many of the instructions out there seem a considerably more complicated than I was after so I thought I'd post the skinny version I ended up with. This isn't a question - hopefully a shortcut for someone trying to do what I've been trying to do.

alt text

If you don't have a levels view open one from under the "windows" main menu option.

If you've already created a level the Levels dropdown option allows you to add an existing item, otherwise it also allows you to create a new one.

The left hand column allows you to show and hide the objects in the editor.

In C++:

 ULevelStreaming *pStreaming = UGameplayStatics::GetStreamingLevel(pWorld, FName(*LevelName));
 if (pStreaming)
 {
     pStreaming->bShouldBeLoaded = true;
     pStreaming->bShouldBeVisible = true;
 }

And hey presto it will load.

Want to unload it? Guess what....

 ULevelStreaming *pStreaming = UGameplayStatics::GetStreamingLevel(pWorld, FName(*LevelName));
 if (pStreaming)
 {
     pStreaming->bShouldBeLoaded = false;
     pStreaming->bShouldBeVisible = false;
 }

There are probably a thousand edge cases for this and things that can go wrong but the above was enough to get me rolling. Here are a couple of little gotchas though:

  • Visibility in the editor is left in the state you leave it in. I haven't yet found the right place to restore this post PIE.

  • Remembering to launch the game from the right level. If you are editing a sublevel that is a dumb object container and press play you may not get the gameplay experience you expect.

Otherwise it seems like lots of cool stuff just works out of the box, lighting, blueprints, etc! You can get the ULevel via the streaming object, do tests too see if things are loaded etc.

Product Version: Not Selected
Tags:
levels.png (15.7 kB)
more ▼

asked Apr 24 '15 at 03:42 PM in Using UE4

avatar image

theonecalledtom
1.3k 61 68 271

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The question is an answer!

more ▼

answered Apr 24 '15 at 03:43 PM

avatar image

theonecalledtom
1.3k 61 68 271

avatar image Muzaheed Mar 24 '16 at 05:22 AM

hi, is it possible to create a new blank level(umap) and add it with persistent level as a streaming level?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question