pub unsafe extern "C" fn PxSerialization_serializeCollectionToBinary(
    outputStream: *mut PxOutputStream,
    collection: *mut PxCollection,
    sr: *mut PxSerializationRegistry,
    externalRefs: *const PxCollection,
    exportNames: bool
) -> bool
Expand description

Serializes a collection to a binary stream.

Serializes a collection to a stream. In order to resolve external dependencies the externalReferences collection has to be provided. Optionally names of objects that where set for example with [PxActor::setName] are serialized along with the objects.

The collection can be successfully serialized if isSerializable(collection) returns true. See [isSerializable].

The implementation of the output stream needs to fulfill the requirements on the memory block input taken by PxSerialization::createCollectionFromBinary.

Serialization of objects in a scene that is simultaneously being simulated is not supported and leads to undefined behavior.

Whether serialization was successful