Asset Layer Docs
Asset LayerAPI Docs
  • 👋Welcome
  • Getting Started
    • Quick Start
      • Quick Start for Developers
      • Quick Start for Creators
      • Quick Start for Unity
    • Core Concepts
      • Users
      • Auth + Permissions
      • Teams
      • Apps
      • Slots
      • Expressions
      • Assets + Collections
      • Currencies
      • Marketplace and Shops
      • Core Concepts in Action
    • SDK Docs
      • Setup
      • Users
        • getUser()
      • Apps
        • info()
        • getApp()
        • getApps()
        • slots()
        • getAppSlots()
        • getAppSlotIds()
      • Slots
        • getSlot()
        • collections()
        • getSlotCollections()
        • getSlotCollectionIds()
        • getSlotExpressions()
        • createExpression()
        • updateExpression()
        • getExpressionTypes()
      • Collections
        • info()
        • getCollection()
        • getCollections()
        • assets()
        • getCollectionAssets()
        • getCollectionAssetIds()
        • createCollection()
        • updateCollection()
        • updateCollectionImage()
        • activateCollection()
        • deactivateCollection()
      • Assets
        • info()
        • getAsset()
        • getAssets()
        • user()
        • getUserAssets()
        • getUserAssetIds()
        • getUserAssetCounts()
        • getUserCollectionAssets()
        • getUserCollectionsAssets()
        • getUserSlotAssets()
        • getUserSlotsAssets()
        • mintAssets()
        • send()
        • sendAsset()
        • sendAssets()
        • sendCollectionAssets()
        • sendLowestAsset()
        • sendRandomAsset()
        • update()
        • updateAsset()
        • updateAssets()
        • updateCollectionAssets()
        • expressionValues()
        • updateAssetExpressionValue()
        • updateAssetsExpressionValue()
        • updateCollectionAssetsExpressionValue()
        • updateBulkExpressionValues()
      • Equips
        • getEquips()
        • setEquip()
        • removeEquip()
      • Currencies
        • info()
        • getCurrency()
        • balance()
        • getCurrencyBalance()
        • getCurrencySummary()
        • increaseCurrencyBalance()
        • decreaseCurrencyBalance()
        • transferCurrency()
      • Listings
        • getListing()
        • user()
        • getUserListings()
        • getUserListingsCounts()
        • getUserCollectionListings()
        • getUserCollectionListingsCounts()
        • getUserSales()
        • getUserSalesCounts()
        • getUserPurchases()
        • getUserPurchasesCounts()
        • collection()
        • getCollectionListings()
        • getCollectionsListings()
        • getCollectionListingsCounts()
        • getCollectionsListingsCounts()
        • getCollectionListingsStats()
        • getCollectionsListingsStats()
        • app()
        • getAppListings()
        • getAppListingsCounts()
        • getAppListingsStats()
        • new()
        • listAsset()
        • listAssets()
        • listCollectionAssets()
        • updateListing()
        • buyListing()
        • removeListing()
      • Shop
        • buyItem()
        • summary()
      • Core Types
        • User
        • App
        • Slot
        • Expression
        • Collection
        • Asset
        • Equip
        • Currency
        • Listing
        • Shop
        • Basic
      • SDK Repo
      • C# SDK for Unity
    • Guides
      • How to Integrate Asset Layer into your Unity Game
    • API Docs
    • Asset Layer GPT
  • Build an app
    • App Setup
      • Creating an App
      • Managing Apps
      • App Info
      • Manage Permissions
      • Manage Slots
      • Manage Collections
      • Manage Currencies
      • App Settings
    • App Development
    • Build With Unity
      • Unity App Setup
      • Advanced Unity Setup
        • WebGL App Setup
      • Asset Layer Unity SDK
        • Login + Authentication
        • Create Assets in Unity
        • Import Assets Into Your Scene
        • Inventory Manager
        • Sync Your Assets
        • Asset Layer Game Server
        • C# SDK
    • Sample App
      • Getting Started With Sample App Locally
      • Environment Variables
      • API Routes
      • Deployment
      • Default Pages
      • Deploying Your Unity WebGL Game Through Sample App
  • Create and Manage Assets
    • Create Assets With Code
    • Create Assets Without Code
      • Create Assets for My App
      • Submit a Collection for a 3rd Party App
      • Create an Independent Collection - Coming Soon!
    • Create Assets in Unity
    • Managing Collections from 3rd Party Creators
  • Manage Assets
    • My Assets
      • Listing Assets for Sale
      • Sending Assets as a Gift
      • My Listings
      • Marketplace History
    • Marketplace
  • Settings
    • Team Settings
    • Account Settings
    • Pricing
  • Details
    • Expression Types
      • Image
      • Audio
      • Video
      • Unity
      • Spine 4.0 (2D Animated Characters)
      • Additional Expression Types
Powered by GitBook
On this page
  • Expression Basics
  • Expressions Belong to Slots
  • Expressions Have Types
  • Expressions Types Have Attributes
  • Default Expressions
  • Expression Data Model
  • Example Expression Data
  • Assets Have Expression Values
  • Expression Value Data Model
  • Example Expression Value Data
  1. Getting Started
  2. Core Concepts

Expressions

PreviousSlotsNextAssets + Collections

Last updated 1 year ago

Expression Basics

Assets can be represented or expressed in different ways. For example, a single asset could have a simple jpeg representation which could be used as a twitter avatar, or it could have a 3D blender model representation for use inside of 3D games. Using Asset Layer, assets can have many different expressions to accommodate the many ways that a single asset can be used across numerous applications.

Expressions Belong to Slots

Expressions are defined at the slot level by the slot owner. Slots are used to organize assets by functionality, and part of what gives an asset a function is the ways it can be expressed.

Expressions Have Types

Asset Layer provides different expression types to support different types of files for representing assets in apps. You can find a list of all current expression types here, Expression Types.

If your app uses files that aren't supported by our current expression types, let us know and we can add a new type for your use case.

Expressions Types Have Attributes

The expression type determines the expression attributes. Some expression types require multiple files. For example, Spine 4.0 requires a PNG sprite sheet, an atlas file, and a JSON file for the animations. So, the Spine 4.0 expression type has three expression attributes, PNG, atlas, and JSON.

Check out this page for a full list of expression types and attributes Expression Types

Default Expressions

By default, all slots contain an expression called "Menu View". This is an image type expression. This expression is intended to contain a 500x500 image file as the expression value. This ensures that there is a standard way for apps to display every asset regardless of other variations from asset to asset. It's very useful for inventory managers and marketplaces, for example.

Expression Data Model

  • expressionId: a UUID for the expression

  • expressionType: the expression type of the expression. This contains details about the expression type name and the expression attributes associated with that expression type.

  • expressionName: a name for the expression

  • slotId: the slot to which the expression belongs

Example Expression Data

"expressionId": "63d27479d8a544dfef057471",
"expressionType": {
  "expressionTypeName": "Image",
  "expressionAttributes": [
    {
      "expressionAttributeName": "Image",
      "expressionAttributeId": "62f83b2482081d6f89953fa7"
    }
  ],
  "expressionTypeName": "Image",
  "expressionTypeId": "62f83b0482081d6f89953fa4"
},
"expressionName": "Menu View",
"slotId": "63d27479d8a5442e2f05746e"

Assets Have Expression Values

Expressions are defined at the Slot level, but expression values are assigned at the asset level. This is because different assets can be represented using different files, even if assets of the same slot have the same requirements.

Assets in identical collections each have the same expression values. This way, you only have to upload files once for the whole collection. Assets in unique collections can have their own expression values. This gives more flexibility, but requires files to be uploaded for each asset. Check out Assets + Collectionsfor more info.

Expression Value Data Model

  • value: the URL to retrieve the expression value file

  • expressionValueId: a UUID for the expression value

  • expressionAttribute: the expression attribute for which this is an expression value

  • expression: the expression for which this is an expression value. This contains the expressionName and expressionId

Example Expression Value Data

"value": "https://asset-api-files-bucket.s3.amazonaws.com/fbe269d5-e1fe-4cb8-8fa1-6cb95772e338.png",
"expressionValueId": "636fc1062093334365821195",
"expressionAttribute": {
  "expressionAttributeName": "Image",
  "expressionAttributeId": "62f83b2482081d6f89953fa7"
},
"expression": {
  "expressionName": "Test Expression",
  "expressionId": "636fc091035f0a2f52c44fb1"
}