Skip to main content

Floating Overhead Buy Indicator

note

This information is only relevant to sellers with access to VRChat's Creator Economy SDK.
If you are interested in setting up a store in VRChat, please apply as a seller.

Floating Overhead Buy Indicator is a prefab that spawns an indicator over a player's head once they have purchased something. Customize it in various ways to highlight your supporters.

FloatingPrefab

How to Import

  1. Download the Unity package directly by clicking here.
  2. Make sure your project is using the World SDK 3.5.0or newer.
  3. Import the Unity package into your project.
Prefabs Included
  • FloatingOverheadBuyIndicatorPrefab: A script that adds the FloatingObjectPrefab above players who own the ExampleProduct.

  • FloatingObjectPrefab: What's spawned above the player when they own the product. You can customize this or replace it with another GameObject to be anything you'd like.

caution

If viewing the example scene, you'll also need the Open Group Page prefab. Otherwise, your project will be missing what it needs for a complete scene.

How to Use

For this (and most!) prefabs, you'll first need an UdonProduct to check for and a way for players to subscribe to this product.

Once you've created a purchasable product:

  1. Drag the FloatingOverheadBuyIndicatorPrefab into your scene. It's invisible by default as there's no image or model to display yet.

FloatingPrefabtoScene

  1. In the Inspector, locate the Product variable. Click on the circle button and replace the example file with your own product.

ProductAdd

  1. Next, locate Overhead Indicator Prefab. This is what will spawn over the players head when they purchase this product. Think of it like the green diamond from the Sims! You can replace this with whatever GameObject you'd like, but just make sure it has no colliders.

ObjAdd

  1. Use Height Above Head to customize how far above the player's head you want the indicator to float.

HeightChange

  1. If you'd like the player to be able to look up and see their own indicator, leave Show Indicator Above Local Player enabled. Disable it if otherwise.
  1. Run Build & Test!

Inspector Parameters

  • UdonProduct - The Udon Product that when owned adds a floating object above a player.
  • Overhead Indicator Prefab - The indicator GameObject that you want to float above players head. Make sure this object doesn't have any colliders or you'll likely run into issues.
  • HeightAboveHead - How far above the player's head you want the indicator to float.
  • Show Indicator Above Local Player - Whether or not you should see an indicator above yourself if you own the product.