XPLMLoadObjectAsync

Function XPLMLoadObjectAsync 

Source
pub unsafe extern "C" fn XPLMLoadObjectAsync(
    inPath: *const c_char,
    inCallback: XPLMObjectLoaded_f,
    inRefcon: *mut c_void,
)
Expand description

XPLMLoadObjectAsync

This routine loads an object asynchronously; control is returned to you immediately while X-Plane loads the object. The sim will not stop flying while the object loads. For large objects, it may be several seconds before the load finishes.

You provide a callback function that is called once the load has completed. Note that if the object cannot be loaded, you will not find out until the callback function is called with a NULL object handle.

There is no way to cancel an asynchronous object load; you must wait for the load to complete and then release the object if it is no longer desired.