UPolyToolkit

#include <PolyToolkit.h>

A UObject that encapsulates the PolyToolkit API.

Summary

PolyToolkit is a singleton.

Inheritance

Inherits from: UObject

Public attributes

OnGetAssetComplete
FOnGetAssetComplete
OnImportAssetComplete
FOnImportAssetComplete
OnListAssetsComplete
FOnListAssetsComplete

Public static functions

GetAsset(const FString & ApiKey, const FString & AssetName, const FOnGetAssetComplete & OnGetAssetCallback)
void
Request full information on a single Asset given an Asset name(id) and an Api Key.
GetPolyToolkitInstance()
Get the PolyToolkit instance.
ImportAsset(UObject *WorldContextObject, const FPolyAsset & Asset, const FOnImportAssetComplete & OnImportCompleteCallback)
void
Imports an Asset at runtime.
ListAssets(const FString & ApiKey, const FString & Keywords, bool Curated, EPolyCategory Category, EPolyComplexity MaxComplexity, EPolyFormat Format, int32 PageSize, EPolyOrder OrderBy, const FString & PageToken, const FOnListAssetsComplete & OnListAssetsCallback)
void
List, search and filter public Assets given a criteria.

Public attributes

OnGetAssetComplete

FOnGetAssetComplete OnGetAssetComplete

OnImportAssetComplete

FOnImportAssetComplete OnImportAssetComplete

OnListAssetsComplete

FOnListAssetsComplete OnListAssetsComplete

Public static functions

GetAsset

void GetAsset(
  const FString & ApiKey,
  const FString & AssetName,
  const FOnGetAssetComplete & OnGetAssetCallback
)

Request full information on a single Asset given an Asset name(id) and an Api Key.

Details
Parameters
ApiKey
The Api Key credential of this app.
AssetName
The name (id) of the asset to get. Note that even though this is called 'name', it does not mean the asset's display name, but its unique ID.
OnGetAssetCallback
The callback to call when the request finishes.

GetPolyToolkitInstance

UPolyToolkit * GetPolyToolkitInstance()

Get the PolyToolkit instance.

ImportAsset

void ImportAsset(
  UObject *WorldContextObject,
  const FPolyAsset & Asset,
  const FOnImportAssetComplete & OnImportCompleteCallback
)

Imports an Asset at runtime.

This method does not support assets that are created with Tilt Brush.

Details
Parameters
Asset
The Asset to be loaded. This should be returned by GetAsset or ListAssets.
OnImportCompleteCallback
A callback to be executed after loading the model.

ListAssets

void ListAssets(
  const FString & ApiKey,
  const FString & Keywords,
  bool Curated,
  EPolyCategory Category,
  EPolyComplexity MaxComplexity,
  EPolyFormat Format,
  int32 PageSize,
  EPolyOrder OrderBy,
  const FString & PageToken,
  const FOnListAssetsComplete & OnListAssetsCallback
)

List, search and filter public Assets given a criteria.

Details
Parameters
ApiKey
The Api Key credential of this app.
Keywords
One or more search terms to be matched against all text that Poly has indexed for assets, including title, description and tags. Multiple keywords should be separated by spaces.
Curated
Restricts to only results that have been curated by the Poly team.
Category
Restricts results to only Assets in the given category.
MaxComplexity
Restricts results to only Assets of at most the given model complexity.
Format
Restricts results to only Assets that contain the given format.
PageSize
Specifies the number of results to return in the first page. This defaults to 100 and has a maximum value of 1000.
OrderBy
Specifies an ordering for the Assets returned.
PageToken
Specifies a continuation token for a previous search whose results were split into multiple pages.
OnListAssetsCallback
A callback to be executed if the list of Assets is succesfully retrieved.