A package for managing dynamic poster displays in VRChat worlds using Udon Sharp. This system allows you to display and update posters dynamically by loading images from external sources, with support for texture atlases and automated content management.
- Unity 2022.3 or later
- VRChat SDK3 (Udon)
- UdonSharp
- PHP 8.4 or later
- Python 3.13 or later
Add the package using Unity Package Manager with the Git URL:
https://github.com/hactazia/udon-posters.git
- Open Unity Package Manager (
Window > Package Manager) - Click the
+button and selectAdd package from git URL... - Enter the URL above and click
Add
Check the VPM repository for the latest version:
Add the package using VRChat Creator Companion:
https://vpm.hactazia.fr/index.json
- Open VRChat Creator Companion
- Go to
Settings > Packages - Add the repository URL above
- Install "Hactazia - Posters" from the available packages
-
Add PosterManager to Scene:
- Drag
Prefab/Manager.prefabinto your scene - Configure the
metaUrlto point to your metadata JSON - Set up
atlasUrlsarray with your texture atlas URLs
- Drag
-
Configure Individual Posters:
Note: The order of posters in the array should match the metadata indices.
- Add
Prefab/Poster.prefabinstances to your scene - Assign them to the
postersarray in PosterManager - Optionally: Set up click interactions and animations
If you want to use the dynamic generation features:
-
Go to the
Generator/folder:- This contains Python scripts for generating metadata and atlases.
-
Install Python Dependencies:
pip install -r requirements.txt
-
Prepare Input Images:
- Place your images in
Generator/input_images/ - Run
make_metadata.pyto generate metadata - You can add additional properties like titles and redirect URLs in the metadata JSON. If you change the order of metadata, it changes the index of the posters, so be careful with that.
- Run
generate_posters.pyto create atlases. If you have many images, it is possible it may take a long time to generate the atlases, so be patient.
- Place your images in
-
Deploy Web Server:
- Production:
- Copy the
api.phpfile to your web server - Ensure PHP is available for the API
- Update URLs in your Unity setup
- Copy the
- Local Testing:
- Use the
start_server.batorstart_server.shscript to run a local server for testing purposes. This will serve the metadata and atlas images from your local machine. You need to run the script in the folder where youroutput_atlasesare located.
- Use the
- Production:
The main controller that handles:
- Metadata loading from external sources
- Atlas image downloading
- Poster synchronization and updates
- Error handling and fallbacks
Individual poster displays that support:
- Dynamic texture assignment
- Aspect ratio adjustment
- Click interactions
- State animations (Loading, Display, Error)
- VRChat Store and Avatar integration
Python-based utilities for:
make_metadata.py: Generates JSON metadata for poster configurations. This is used to define poster properties and atlas mappings like title and redirect URLs.generate_posters.py: Creates optimized texture atlases from input images.api.php: Web API for serving atlas data and images.
In Metadata JSON:
The order of entries in the metadata JSON should match the order of posters in the posters array. Each entry should include:
- title: Display name for the poster
- url: Redirect URL
Redirect URL Formats:
- VRChat Store Groups:
grp_[group_id]#store - VRChat Products:
prod_[product_id] - Avatar Listings:
avtr_[avatar_id]#listing - Avatar Pedestals:
avtr_[avatar_id]
-
Images Not Loading:
- Check URL accessibility
- Verify CORS headers on your server
- Ensure image formats are supported (PNG, JPG)
-
Metadata Errors:
- Validate JSON format
- Check array indices match available atlases
Contributions are welcome! Please follow the existing code style and include appropriate documentation for new features.
This package uses icons from Google Fonts Icons with the Rounded style.