Automatically uploads a list of patrons to VRChat everytime a patron joins or leaves, without reuploading the world. For use with https://github.com/Miner28/AvatarImageReader
The parser is the system that connects to AvatarImageReader to turn the output of the encoder into easily useable text. Requires the latest version of UdonSharp and AvatarImageReader
- Import the latest version of AvatarImageReader into your project
- Create a new AvatarImageReader prefab using the menu item
Tools/AvatarImageReader/Create Image Reader
- Open the inspector for the generated Decoder gameobject and click Set Avatar, then select the desired avatar to be used. This can just be an empty avatar descriptor uploaded using the avatar SDK. It doesn't matter what platforms the avatar has been uploaded for. You can use Enter ID to manually paste in the blueprint ID.
- Enable Link with Patreon Decoder in the inspector
- Either import the UnityPackage for the Parser into your project or add the script manually, then add it to a new GameObject.
- Reference the Decoder behaviour from the Parser and vice versa.
- Enter the names for the roles you want to parse, and optionally set up TextMeshPro references to print lists of patrons to.
Before using any of these functions you should check if decodeFinished
is set to true. You can also set up a callback behaviour to run checks once decoding has finished.
PatreonDecoder lives in the namespace BocuD.PatreonParser
.
bool _LocalPlayerHasRole(string targetRole)
: returns true if the local player has the specified role.
string[] _GetPatronsByString(string targetRole)
: returns a string array of display names that have the specified role.
string[] _GetPatronsFromID(int roleID)
: returns a string array of display names for the specified role ID (the index of the role in the inspector)