-
Notifications
You must be signed in to change notification settings - Fork 6
Saver (3.0)
In this class you will find utilities for saving regions of the world into structure data, and then saving that data into files if needed. This API is typically reserved for more atypical or advanced use cases such as saving and placing structures at runtime or creating custom tools for saving structures.
public static StructureData SaveToStructureData(int x, int y, int width, int height)Saves a region of the world into a StructureData object.
-
x: The leftmost point of the region -
y: The topmost point of the region -
width: The width of the region -
height: The height of the region
- a StructureData object representing that region of the world
-
ArgumentException: If any part of the region is outside of the world
public static StructureData SaveToStructureDataWithCustom(int x, int y, int width, int height, List<Type> customTypes)Saves a region of the world into a StructureData object, including the specified custom ITileData types.
-
x: The leftmost point of the region -
y: The topmost point of the region -
width: The width of the region -
height: The height of the region -
customTypes: The types of ITileData to save in addition to vanilla ITileData. These should all be blittable ITileData types.
- a StructureData object representing that region of the world
-
ArgumentException: If any part of the region is outside of the world
public static void SaveToFile(StructureData data, string targetPath = null, string name = "unnamed structure")Saves a given StructureData to a file, the location is by the target path, and with the given name.
-
data: The StructureData to save -
targetPath: The path to the directory save the file into -
name: The name of the file, NOT including the extension
public static void SaveMultistructureToFile(MultiStructureData data, string targetPath = null, string name = "unnamed multistructure")Saves a given MultiStructureData to a file, the location is by the target path, and with the given name.
-
data: The MultiStructureData to save -
targetPath: The path to the directory save the file into -
name: The name of the file, NOT including the extension
Do you want me to generate this as a .md file for your docs directly, or just leave it in text like this?
