MindV0odoo Posted September 23, 2023 Share 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! Link to comment
rostislavr Posted September 25, 2023 Share 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 Link to comment
MindV0odoo Posted September 26, 2023 Author Share Posted September 26, 2023 That works perfectly, thanks! Link to comment
Recommended Posts