|
| static string | CreateWorld (string relativeWorldDirectory, string worldName, array< ResourceName > defaultLayerEntities=null, bool overwriteWorldFile=false, bool overwriteDefaultLayerFile=false) |
| | Create a world and registers it through Resource Manager.
|
| |
| static bool | DuplicateWorld (string absoluteSourceFilePath, string absoluteDestinationFilePath) |
| | Create a copy of the provided world's directory.
|
| |
| static bool | ReplaceWorldEntity (string relativeWorldFilePath, ResourceName newWorldEntityPrefab) |
| | Replaces the current WorldEntity (GenericWorldEntity or Prefab) by the provided Prefab.
|
| |
|
| static const string | GENERIC_WORLD_ENTITY_CLASS = "GenericWorldEntity" |
| |
| static const string | LAYERS_DIR = "%1_Layers" |
| |
| static const string | DEFAULT_LAYER = "default.layer" |
| |
| static const ref array< string > | COPY_SUB_DIRECTORIES = { ".Rivers", ".Shore", "SurfaceMasks", "Terrain", "%1", LAYERS_DIR } |
| |
| static const ref array< string > | COPY_DIR_FILES = { "%1.ent", "%1.smap", "%1.smd", "%1.topo", "%1_SMD.conf" } |
| |
| static const ref array< bool > | COPY_DIR_FILES_REGISTER = { 1, 1, 0, 1, 1 } |
| |
◆ CreateWorld()
| static string SCR_WorldFilesHelper.CreateWorld |
( |
string | relativeWorldDirectory, |
|
|
string | worldName, |
|
|
array< ResourceName > | defaultLayerEntities = null, |
|
|
bool | overwriteWorldFile = false, |
|
|
bool | overwriteDefaultLayerFile = false ) |
|
static |
Create a world and registers it through Resource Manager.
- Parameters
-
| [in] | relativeWorldDirectory | addon-prefixed path |
| [in] | worldName | created files will be based on this name |
| [in] | defaultLayerEntities | entities to be created in the default layer - if no GenericWorldEntity Prefab is provided, a default one will be created |
| [in] | overwriteWorldFile | if set to true, deletes and rewrites world file if it exists |
| [in] | overwriteDefaultLayerFile | if set to true, deletes and rewrites default layer file if it exists |
- Returns
- addon-prefixed world .ent RELATIVE file path on success, empty string on failure
◆ DuplicateWorld()
| static bool SCR_WorldFilesHelper.DuplicateWorld |
( |
string | absoluteSourceFilePath, |
|
|
string | absoluteDestinationFilePath ) |
|
static |
Create a copy of the provided world's directory.
- Parameters
-
| [in] | absoluteSourceFilePath | absolute source world ent file path |
| [in] | absoluteDestinationFilePath | absolute destination world ent file path |
- Returns
- true on success, false otherwise
◆ GetDefaultLayerAbsoluteFilePath()
| static string SCR_WorldFilesHelper.GetDefaultLayerAbsoluteFilePath |
( |
string | relativeWorldFilePath | ) |
|
|
staticprotected |
Get the absolute path to the default layer (worldDir/worldName_Layers/default.layer)
- Parameters
-
| [in] | relativeWorldFilePath | addon-prefixed .ent file path in which to replace the GenericWorldEntity |
- Returns
- path to the default layer or empty string on error
◆ ReplaceWorldEntity()
| static bool SCR_WorldFilesHelper.ReplaceWorldEntity |
( |
string | relativeWorldFilePath, |
|
|
ResourceName | newWorldEntityPrefab ) |
|
static |
Replaces the current WorldEntity (GenericWorldEntity or Prefab) by the provided Prefab.
- Parameters
-
| [in] | relativeWorldFilePath | addon-prefixed .ent file path in which to replace the GenericWorldEntity |
| [in] | newWorldEntityPrefab | the new WorldEntity Prefab; if empty, default GenericWorldEntity is be used |
- Returns
- true on success, false otherwise
◆ ReRegisterMetaFiles()
| static void SCR_WorldFilesHelper.ReRegisterMetaFiles |
( |
notnull ResourceManager | resourceManager, |
|
|
string | dir ) |
|
staticprotected |
◆ COPY_DIR_FILES
| const ref array<string> SCR_WorldFilesHelper.COPY_DIR_FILES = { "%1.ent", "%1.smap", "%1.smd", "%1.topo", "%1_SMD.conf" } |
|
staticprotected |
◆ COPY_DIR_FILES_REGISTER
| const ref array<bool> SCR_WorldFilesHelper.COPY_DIR_FILES_REGISTER = { 1, 1, 0, 1, 1 } |
|
staticprotected |
◆ COPY_SUB_DIRECTORIES
| const ref array<string> SCR_WorldFilesHelper.COPY_SUB_DIRECTORIES = { ".Rivers", ".Shore", "SurfaceMasks", "Terrain", "%1", LAYERS_DIR } |
|
staticprotected |
◆ DEFAULT_LAYER
| const string SCR_WorldFilesHelper.DEFAULT_LAYER = "default.layer" |
|
staticprotected |
◆ GENERIC_WORLD_ENTITY_CLASS
| const string SCR_WorldFilesHelper.GENERIC_WORLD_ENTITY_CLASS = "GenericWorldEntity" |
|
staticprotected |
◆ LAYERS_DIR
| const string SCR_WorldFilesHelper.LAYERS_DIR = "%1_Layers" |
|
staticprotected |
The documentation for this interface was generated from the following file:
- WorkbenchGame/WorldEditor/Helpers/SCR_WorldFilesHelper.c