Is UWorld used to create multiple game "Worlds" ?
After doing some experimenting and evaluation of UE4 over the past few months, I now wish to see if I can actually create different multiple "worlds" where levels can be generated or created in.
What I want to accomplish is that to progress in a game, a player "teleports", or is transferred from one game world to another, perhaps similar to traveling from one game level to another. The new world will have different world settings, parameters, rules, themes and assets etc
According to the API documentation for UWorlds it states
"In a standalone game, generally only a single World exists except during seamless area transitions when both a destination and current world exists. In the editor many Worlds exist: The level being edited, each PIE instance, each editor tool which has an interactive rendered viewport, and many more."
After searching the web, this answer hub, and the forums I cannot find anything of real substance to give a clear indication if UWorlds is actually used to create a multiple worlds in a game where a player in a game can be transported to a new game world. Also, if what I want to accomplish can be done, I cannot find any hint how to do it in C++, Blueprints or the editor. Even though it seems from the documentation text that multiple worlds are possible to create in the editor, I cannot find a "New world" menu option to create a world to populate with actors, players, let alone how one can set up a "door" to move from one world to another. However there is a menu option in the floating editor window that is "Attatch to->choose world"
So my question comes to this. 1 : Can I create a game as described above in UE4?
If yes 2a : Is UWorld the correct class to use to do this, and if not what is the method that is used? 2b : Do examples or documentation of how to accomplish what I am aiming to achieve exist, and where can I find it?
I hope this is not too difficult a query, and would appreciate any response that can help. Thanks in advance.
No answers to this query.
No matter. I think I have found out the answer myself after taking a couple of guesses and trying them out to find that they seemed to work.
I created a new UWorld when I guessed using the UWorld::CreateWorld() command was the way to do it. Un-intuitive to me in that it looks like a class creates itself with it own creation function. Shame that it seems one cannot do the same with a level in c++.
Second, after digging around thinking that I needed to create a 'persistent level' (or any level using c++ for that matter) so as to add objects to this world I found nothing. Concluding that the UE4 editor is analogous to a 2D image editor like Gimp or Photoshop, I guessed the act of creating a new world also creates a 'persistent level' much like an image editor needs a canvas to display the image on. Yep that was it. After adding a light source and a floor to this persistent level it seems I was able to see that had transport my character into the created world.
What are called levels in the editor are really analogous to layers in an image editor. The term levels mislead me into believing that thees were separate maps that could not be overlayed on top of each other. But they can, and turning each layer, sorry, level on and off in the editor demonstrates this as have a few tutorials on streaming levels.
A lot more needs to be investigated, but the non existence of documentation and tutorials etc, not to mention the inexplicable inability of the editor to have multiple worlds to edit can make this a grueling experience.
I think you are looking about the World problem the wrong way. If you want to have a the player move between major sections, treat each major section like a level (i.e a Map). UWorld is more of an interface to hold the level, and spawn in actors. Note World settings are applied per map, and each map can have its own gamemode override that specifies the world.
In short, I think you should be thinking of maps as worlds, not UWorlds as planets.
answered Dec 02 '18 at 02:06 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here