Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrainEditor module · member function

UOrbdaleTerrainBake::

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="Orbdale|Terrain|Editor", meta=(AutoCreateRefTerm="Options"))
static bool BakeAuthoring(AOrbdaleTerrainActor* Actor, const FOrbdaleTerrainBakeOptions& Options, FOrbdaleTerrainBakeReport& OutReport);
Blueprint Bake Authoring
The graph as text
  1. Bake Authoring (function call)
    • In Actor (OrbdaleTerrainActor object): None
    • In Options (OrbdaleTerrainBakeOptions): not connected
    • Out Out Report (OrbdaleTerrainBakeReport): not connected
    • Out Return Value (Boolean): not connected
Header
#include "Authoring/OrbdaleTerrainBake.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrainEditor"); 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 Orbdale › 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
ActorAOrbdaleTerrainActor*—

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

Optionsconst FOrbdaleTerrainBakeOptions&—

Saving and memory.

OutReportFOrbdaleTerrainBakeReport&—

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.