PolyToolkit.PolyAsset

Represents a Poly asset (the information about a 3D object in Poly).

Summary

This is not the actual object that is added to the scene. This is just a container for the object's data, from which a GameObject can eventually be constructed.

Public attributes

authorName
string
Name of the asset's author.
createTime
DateTime
Date and time when the asset was created.
description
string
Human-readable description of the asset.
displayName
string
Human-readable name of the asset.
formats = new List()
List< PolyFormat >
A list of the available formats for this asset.
isCurated
bool
If true, the asset was manually curated by the Poly team.
license
The license under which the author has made this asset available for use, if any.
name
string
Identifier for the asset.
thumbnail
Thumbnail image information for this asset.
thumbnailTexture
Texture2D
The texture with the asset's thumbnail image.
updateTime
DateTime
Date and time when the asset was last updated.
visibility
Visibility of this asset (who can access it).

Properties

AttributionInfo
string
Returns attribution information about the asset.
IsMutable
bool
Returns whether the asset is known to be mutable, due to its visibility.
Url
string
Returns the Poly url of the asset.

Public functions

GetFormatIfExists(PolyFormatType type)
Returns a PolyFormat of the given type, if it exists.
ToString()
override string

Public attributes

authorName

string authorName

Name of the asset's author.

createTime

DateTime createTime

Date and time when the asset was created.

description

string description

Human-readable description of the asset.

displayName

string displayName

Human-readable name of the asset.

formats

List< PolyFormat > formats = new List()

A list of the available formats for this asset.

Each format describes a content-type of a representation of the asset, and specifies where the underlying data files can be found.

isCurated

bool isCurated

If true, the asset was manually curated by the Poly team.

license

PolyAssetLicense license

The license under which the author has made this asset available for use, if any.

name

string name

Identifier for the asset.

This is an alphanumeric string that identifies the asset, but is not meant for display. For example, "assets/L1o2e3m4I5p6s7u8m".

thumbnail

PolyFile thumbnail

Thumbnail image information for this asset.

thumbnailTexture

Texture2D thumbnailTexture

The texture with the asset's thumbnail image.

Only available after successfully fetched.

updateTime

DateTime updateTime

Date and time when the asset was last updated.

visibility

PolyVisibility visibility

Visibility of this asset (who can access it).

Properties

AttributionInfo

string AttributionInfo

Returns attribution information about the asset.

IsMutable

bool IsMutable

Returns whether the asset is known to be mutable, due to its visibility.

Public and unlisted assets are immutable. Private assets are mutable.

Immutable assets can be cached indefinitely, since they can't be modified. Depending on your use-case, you may wish to frequently re-download mutable assets, if you expect them to be changed while your app is running.

Url

string Url

Returns the Poly url of the asset.

Public functions

GetFormatIfExists

PolyFormat GetFormatIfExists(
  PolyFormatType type
)

Returns a PolyFormat of the given type, if it exists.

If the asset has more than one format of the given type, returns the first one seen. If the asset does not have a format of the given type, returns null.

ToString

override string ToString()