Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · member function

UOrreryTerrainBake::

BakeAuthoring

Editor onlyBlueprint

Bake Actor's authoring layer into a new tile store beside its map and re-point the actor at it.

Declaration

UFUNCTION(BlueprintCallable, Category="Orrery|Terrain|Editor", meta=(AutoCreateRefTerm="Options"))
static bool BakeAuthoring(AOrreryTerrainActor* Actor, const FOrreryTerrainBakeOptions& Options, FOrreryTerrainBakeReport& OutReport);
Blueprint Bake Authoring
The graph as text
  1. Bake Authoring (function call)
    • In Actor (OrreryTerrainActor object): None
    • In Options (OrreryTerrainBakeOptions): not connected
    • Out Out Report (OrreryTerrainBakeReport): not connected
    • Out Return Value (Boolean): not connected
Header
#include "Authoring/OrreryTerrainBake.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor"); in an editor module’s Build.cs: an editor module, not in packaged games.
Stability
Stable: changes within a major version only add.
Thread
Game thread, editor only.
Blueprint
Bake Authoring, in Orrery › Terrain › Editor

Description

In order: refuses an unsaved map; captures the live editor terrain's pending edits; composes the store (holes included: a baked hole stays a hole); writes the archive of the authoring layer; saves both when Options.bSave; then re-points Source, empties the authoring asset, re-creates the editor terrain, resets the editor's undo history (an undo across a bake would restore edits the store already holds) and saves the map and the authoring asset. The store is named <Map>_TerrainStore_<n> in Project Settings' Bake Folder (beside the map when empty), the archive <Map>_TerrainAuthoring_PreBake_<n> in the Authoring Folder, n the smallest number free for both.

Parameters

NameTypeDefaultMeaning
ActorAOrreryTerrainActor*—

The terrain actor; its map must have been saved once.

Optionsconst FOrreryTerrainBakeOptions&—

Saving and memory.

OutReportFOrreryTerrainBakeReport&—

What was made, or why nothing was.

Returns

true when the actor was baked, or held nothing to bake (OutReport.bBaked tells them apart).

Note.

Game thread, editor only. Changes nothing when it fails before the store is saved; when a later save fails, the saved store and archive are kept and OutReport.Error says what is left to save.