TorqueScript Reference
Functions
Serialization

Functions

Integer loadObject (filename)
 
Boolean saveObject (object, filename)
 

Detailed Description

Function Documentation

◆ loadObject()

Integer loadObject ( filename  )

Loads an object from the specified filename

Parameters
filenameThe name of the file to load the object from
Returns
Returns the ID of the object on success, or 0 on failure.
See also
FileObject::writeObject, SimObject::save

◆ saveObject()

Boolean saveObject ( object  ,
filename   
)

Saves the given object to the given filename

Parameters
objectThe SimObject to save
filenameThe name of the file in which to save the object
Returns
Returns true on success and flase on failure
See also
FileObject::writeObject, SimObject::save