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
  • Why Use Slots?
  • Interoperability With Slots
  • Slot Data Model
  • Example Slot Data
  1. Getting Started
  2. Core Concepts

Slots

PreviousAppsNextExpressions

Last updated 1 year ago

Slots group assets by function to help apps know how to use the asset. Slots are used to create new Expressions and Collections, to customize sharing assets through permissions, and more.

Why Use Slots?

Imagine a simple dress-up game that uses assets for clothing items. We can group clothes into a few categories - hats, glasses, shirts, pants, and shoes. While this isn't an exhaustive list, these categories are clearly distinct. If a piece of clothing is a hat, it isn't a shoe.

If you were building this game using Asset Layer, we'd recommend creating a slot for each category of clothes. If I create a collection of tennis shoe assets, that collection should be a part of the shoe slot. If the collection is of baseball caps, then the collection should be a part of the hat slot. By grouping your assets by function using slots, it is much easier to share these assets across apps. Our tools make use of slots today, and we will increasingly utilize the slot as a fundamental building block for apps using Asset Layer.

Interoperability With Slots

Slots become the basis for interoperability of assets between apps. Slots are created as a part of a specific app, but apps can also add slots from other apps. A slot owner is the app which created a given slot. A foreign slot is a slot that has been added to your app which wasn't created by your app. Adding a foreign slot requires permission from the slot owner. For more details about permissions, see Auth + Permissions page.

When you add a foreign slot to your app, you get access to assets which occupy that slot. Because slots group assets by function, you should be able to use any asset in that slot in a predictable way. It is the responsibility of slot owners to manage their slots effectively and to only approve collections of assets which meet the requirements of a slot.

Slot Data Model

  • slotId: a UUID for the slot

  • slotName: a name for the slot

  • slotImage: a url for a 300x300 image used to represent the slot in menus

  • description: a text description of the slot

  • appId: the app that created the slot

  • acceptingCollections: true if the slot is accepting collection submissions from third parties

  • isPublic: true if the slot can be shared with other apps

  • collectionTypes: specifies which collection types can be contained in the slot. Can be "both", "unique", or "identical"

  • createdAt: date-time when the app was created

  • updatedAt: date-time when the app was last updated

  • collections : an array of collectionIds that are a part of the slot (see Assets + Collectionsfor details)

  • expressions: an array of expressionIds that are a part of the slot (see Expressions for details)

Example Slot Data

"slotId": "63d27479d8a5442e2f05746e",
"slotName": "TestSlot",
"slotImage": "https://asset-api-files-bucket.s3.amazonaws.com/8e4a0672-ef18-4e42-90d2-fc58a4bcb799.png",
"description": "test description",
"appId": "63d27445d8a544d641056b37",
"acceptingCollections": false,
"isPublic": true,
"collectionTypes": "unique",
"createdAt": 1674736761473,
"updatedAt": 1674736770540,
"collections": ["64be8a60616a24971532d172",
                "64bfda7fc32ada6ec09db25b"],
"expressions": ["63d27479d8a544dfef057471"]