Floating Overhead Buy Indicator
Submit an application if you want to join the Creator Economy!
The page below is only relevant to sellers with access to VRChat's Creator Economy.
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.
How to Import
- Open the Example Central Window from the window from the Unity Editor Menu under "VRChat SDK > 🏠 Example Central"
- If you haven't enabled Creator Economy examples yet:
- Press the ⚙️ gear icon in the Example Central window to open the Example Central settings.
- Enable "Show Creator Economy Examples".
- Select this prefab in Example Central.
- Press the "Import" button to import the example assets into your project.
Prefabs Included
-
FloatingOverheadBuyIndicatorPrefab: A script that adds the
FloatingObjectPrefab
above players who own theExampleProduct
. -
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.
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:
- Drag the FloatingOverheadBuyIndicatorPrefab into your scene. It's invisible by default as there's no image or model to display yet.
- In the Inspector, locate the Product variable. Click on the circle button and replace the example file with your own product.
- 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.
- Use Height Above Head to customize how far above the player's head you want the indicator to float.
- 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.
- 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.