This method saves the model to a file, in glTF or Wavefront OBJ format.
Parameter | Description |
---|---|
path | file path to save |
flags | optional save flags |
Returns true if the model is successfully saved, otherwise false is returned.
-- Create model
local model = CreateBox(nil)
-- Save to file
if model:Save("box.obj") then
-- Show file
OpenDir("box.obj")
end