Jump to content

[SOLVED] Set lmap compression via code?


photo

Recommended Posts

Hi,

I am trying to create lmap files via the api (LandscapeMapFileCreator and related classes) and have successfully done so for uncompressed files, however I cannot find any way to set the compression to the 'custom' method as can be done via the editor UI. Is this possible using the api, and if so can anyone provide a code snippet to accomplish it? Thanks!

image.png.ae27ec9e50039df60c409ab8f98dd0cd.png

Link to comment

Hello,

You must use the LandscapeMapFileCompression class to work with landscape compression.

LandscapeMapFileCompressionPtr compression = LandscapeMapFileCompression::create();
compression->setGUID(landscape_guid);
compression->setCompressorAll(Landscape::COMPRESSOR_TYPE_JACKALLESS);
compression->compress(true);

You can see API documentation here

https://developer.unigine.com/en/docs/2.17/api/library/objects/landscape_terrain/class.landscapemapfilecompression?rlang=cpp

Link to comment
  • silent changed the title to [SOLVED] Set lmap compression via code?
×
×
  • Create New...