Announcement

Collapse
No announcement yet.

Save procedural generated map as *.umap?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by redbox View Post
    Why do you want to generate them in game?
    Do this in level editor.
    How exactly would I do this?
    I can't spawn actors during the construction script (tested it):
    Code:
    [2019.07.12-19.58.19:404][537]LogSpawn: Warning: SpawnActor failed because we are running a ConstructionScript (Actor)

    Leave a comment:


  • replied
    Originally posted by SirMorokei View Post

    Okay, good to know.
    Do you have a link to that module?
    It's in Json folder from Runtime source code: Runtime/Json/Public/Dom/JsonObject.h

    http://api.unrealengine.com/INT/API/...Dom/index.html

    Leave a comment:


  • replied
    Originally posted by Manoel.Neto View Post
    You don't even need to get that far, if all you want is save some data like which models and their locations, you can just create a custom struct or UObject class and serialize it to disk. Easier to use than dealing with json serialization.
    Depends, I worked with json often so it isn't a big deal for me.

    Leave a comment:


  • replied
    You don't even need to get that far, if all you want is save some data like which models and their locations, you can just create a custom struct or UObject class and serialize it to disk. Easier to use than dealing with json serialization.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    If you want to do that in Editor, that's fine.
    That can't be done in packaged games tho. If you want to do that in shipped games you need a custom map serializer, Unreal has a built-in JSON module that works in runtime modules and you could save any info to Json format and write/read that to/from a text file.
    Okay, good to know.
    Do you have a link to that module?

    Leave a comment:


  • replied
    If you want to do that in Editor, that's fine.
    That can't be done in packaged games tho. If you want to do that in shipped games you need a custom map serializer, Unreal has a built-in JSON module that works in runtime modules and you could save any info to Json format and write/read that to/from a text file.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    Only editor modules can generate assets.
    So I couldn't just run:

    1.
    Code:
    UEditorLoadingAndSavingUtils::NewMapFromTemplate(const FString & PathToTemplateLevel, bool bSaveExistingMap)
    2. run my generation functions and after that run
    3.
    Code:
    UEditorLoadingAndSavingUtils::SaveMap(UWorld * World, const FString & AssetPath)
    https://api.unrealengine.com/INT/API...ils/index.html

    Leave a comment:


  • replied
    Only editor modules can generate assets.

    Leave a comment:


  • replied
    Originally posted by redbox View Post
    Why do you want to generate them in game?
    Do this in level editor.
    To generate 'unlimited' maps and use the level streaming feature to get a better environment / world that can expand over time.

    Leave a comment:


  • replied
    Why do you want to generate them in game?
    Do this in level editor.

    Leave a comment:


  • started a topic Save procedural generated map as *.umap?

    Save procedural generated map as *.umap?

    Hey folks,

    I want to create some procedural generated maps so that I can save time to manual create levels. But that can only work for me if I'm able to save these maps after generation.

    How I plan to do that:
    • Create workflow for procedural generation
    • Run the game which automatically runs the workflow
    • Save the procedural generated map as *.umap so I can use it to expand/place stuff on it
    The first two points will work for sure but I don't know if it is possible to save the procedural generated map as *.umap during runtime / or if it is even possible at all with UE4.
    Last edited by SirMorokei; 07-10-2019, 08:11 PM.
Working...
X