Data resource

Helper types and accessors for the data resource type (`.datac`).

Namespace: dmGameSystem
Include: #include <dmsdk/gamesys/resources/res_data.h>
STRUCTS
struct DataResource Opaque handle to a loaded data resource
FUNCTIONS
const dmGameSystemDDF::Data* GetDDFData(DataResource* res) Get the underlying DDF data

Functions

GetDDFData

const dmGameSystemDDF::Data* GetDDFData(DataResource* res)

Returns a pointer to the decoded dmGameSystemDDF::Data protobuf message contained in the given data resource. The lifetime of the returned pointer is tied to the lifetime of the resource. It must not be freed by the caller.

PARAMETERS

DataResource* res Data resource handle

RETURNS

const dmGameSystemDDF::Data* Pointer to the DDF data message, or 0 if the resource is invalid.

Structs

DataResource

TYPE

struct DataResource

This struct is an opaque handle managed by the engine. Use GetDDFData() to access the underlying protobuf message for read-only inspection.