Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

SDK_API::readWorkspaceAsset

Reads a shared text/JSON asset from the selected engine workspace.

Declaration

std::string readWorkspaceAsset(const std::string& node, const std::string& asset_namespace, const std::string& filename) {
            return callTempest(node, "dartwic/get-file", {{"rootDir", "workspace_assets_directory"},
                {"filePath", workspaceAssetPath(asset_namespace, filename).substr(7)}}).at("content").get<std::string>();
        }

Parameters

NameDescription
nodeTarget engine node name.
asset_namespaceShared asset namespace.
filenameAsset filename including extension.

Returns

Text content of the asset.