MindV0odoo Posted September 23, 2023 Posted September 23, 2023 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!
rostislavr Posted September 25, 2023 Posted September 25, 2023 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
Recommended Posts