Skip to main content

Open Listing

This example contains two prefabs that allow users to open one of your listings by pressing a button.

How to Import

  1. Open the Example Central Window from the window from the Unity Editor Menu under "VRChat SDK > 🏠 Example Central"
  2. If you haven't enabled Creator Economy examples yet:
    1. Press the ⚙️ gear icon in the Example Central window to open the Example Central settings.
    2. Enable "Show Creator Economy Examples".
  3. Select this prefab in Example Central.
  4. Press the "Import" button to import the example assets into your project.

Prefabs included

  • OpenListingPrefab: Includes a button to open to a listing page. Also includes a text description.
  • OpenListingSimplePrefab: Includes a button to open to a listing page. Does not include a text description.

OpenListingPrefab

  • OpenListingDeluxePrefab: Includes a thumbnail, and fields for the name, type and price of the listing.

OpenListingPrefab

How to Use

For each prefab, you'll need to replace any ID with the ID of your own group or product.

  1. Select the chosen prefab in your Unity scene.

  2. Set the ID of the listing in the Listing ID field in the inspector window.

DragListingID

  1. For OpenListingDeluxe:
    • Set the Thumbnail for the listing using the Thumbnail field in the inspector window. It's best if you use the same thumbnail that the user will see when opening your listing, but you have the ability to use any square Sprite in your project.
    • Set the three text lines using the Display Name, Type and Price fields. Just like the thumbnail, it's best if these match what the user will see in your listing, but you can enter any information you like.

OpenListingDeluxeFields

  1. Run Build & Test!

Inspector Parameters

The two prefabs have the following parameters:

OpenListing

  • Listing ID - The listing ID of the listing you want to open.

OpenListingDeluxe

  • Thumbnail - The sprite shown in the prefab, typically the same as the thumbnail set for the listing.
  • Display Name - The first line of text, typically the Display Name of the listing.
  • Type - The second line of text, typically the Type of the listing - Consumable, Instant, etc.
  • Price - The third line of text, typically the Price of the listing in VRChat Credits.