Skip to main content

Subscribers Only Area

tip

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.

Subscribers Only Area is a prefab that sets up an area where only subscribers can enter or non subscribers cannot leave from. Use this to create exclusive areas, events, and experiences in your world.

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
  • SubscribersOnlyAreaExamplePrefab: A prefab that contains a full example of how to use the SubcribersOnlyArea script.
caution

If viewing the example scene, you'll also need the Open Group Page and Udon Product Toggle prefabs. Otherwise, your project will be missing what it needs for a complete example 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. Open the SubscribersOnlyAreaExampleScene from your Project window. The scene will contain a building asset to help you test and understand how the prefab works.

PrefabScene

  1. In the Hierarchy, click on the SubcribersOnlyAreaExamplePrefab.

HierarchyClick

  1. In the Inspector, add which Udon Product you would like to check for when a player enters or is inside of a certain area.

AddProduct

  1. In the Hierarchy, select OpenListingSimplePrefab. Paste your listing ID here. This will show a link to purchase the product where necessary.
    • To get your listing ID, go to vrchat.com/home, then Marketplace -> Storefront -> My Listings.

AddListingID

  1. In the Hierarchy, click on the SubcribersOnlyAreaExamplePrefab again. You'll see a few different settings:

    • Trespassing Message is what appears if a player enters/is inside a subscriber-only area and does not own the correct Udon Product.

    • Trespassing Teleport Location is where the player is sent if they try and enter or have ended up in a location they do not have access to. You can move this in your scene to wherever you like, just make sure it's outside of the subscriber-only area.

    • Area Colliders are what keep non-subs out of your exclusive area. In this prefab, it is a box collider inside of our example asset. You should adjust this in your scenes to best fit your needs.

TrespassingText

  1. If you would like to keep non subscribers inside of a specific area instead, enable Keep People In Area. If enabled, make sure your spawn and Trespassing Teleport Location are within the collider instead of outside the collider.
tip

Enable this if you are creating a large, exclusive area, and want to keep all non-subs together. Think lining up to buy tickets before getting into an amusement park. We recommend you keep it disabled if you're only sectioning off a small part of your world, like an exclusive room.

  1. In the Hierarchy, click on the drop down arrow next to SubcribersOnlyAreaExamplePrefab. Click on SubscribersOnlyAreaBlockerToggle.

  2. In the Inspector, select the same Udon Product you chose earlier. Now, when a player owns this product, this door will be disabled.

    • You can read more about disabling and enabling blockers like doors and walls on the Udon Product Toggle prefab page.
  3. Run Build & Test!

Inspector Parameters

  • Udon Product - The Udon Product that counts as being a subscriber when owned.
  • Trespassing Message - The GameObject that will be activated and shown when the player is trespassing to show them the trespassing message.
  • Trespassing Teleport Location - The location the player will be teleported to when they have trespassed.
  • Area Colliders - The colliders that define the area that is for subscribers/non subscribers only depending on the Keep People In Area Toggle. These will be disabled at runtime to save performance.
  • Keep People In Area - Toggle this on to force players to stay in area instead of keeping them outside the area. Make sure your spawn and Teleport Location are inside the area if you use this.