Class: Asset
Lua
C++
Edit

Asset:Save

This method saves the object to a file.

Syntax

boolean Save(string path, number flags)

Parameter Description
path string representing the file path to save to.
flags optional save flags

Returns

Returns true if saving is supported for this object type, and if the object was successfully saved, otherwise false is returned.

Example

--Load an asset
local pixmap = LoadPixmap("https://github.com/UltraEngine/Documentation/raw/master/Assets/Materials/Brick/brickwall01.dds")

--Save the asset
local path = GetPath(PATH_DOCUMENTS) .. "/temp.dds"
pixmap:Save(path)

--Open the file
RunFile(path)
Copyright © 2024 Ultra Software.
All rights reserved.