World Utilities / Values
URL
A VRCUrl for images, videos and remote text.
since v0.1.0localsynchronizednetworked
| Component | Add Component menu / prefab | Source |
|---|---|---|
Local URLVRCTools.World.LocalValues.LocalUrl
|
Local Values › Local URLprefab: Local URL.prefab
|
LocalUrl.cs ↗ |
Synchronized URLVRCTools.World.SynchronizedValues.SynchronizedUrl
|
Synchronized Values › Synchronized URLprefab: Synchronized URL.prefab
|
SynchronizedUrl.cs ↗ |
URL values store a VRCUrl, the only URL type VRChat allows you to load content from. Pair them with a
Texture2D Loader to display remote images, or hand the
state to your video player script.
Parameters
| Parameter | Default | Description |
|---|---|---|
| Default Value | (empty) | The state the value is initialized with. |
Synchronized variants additionally expose the networking settings.
Networked values need a unique hierarchy path - see naming networked objects.
Events
| Event | Kinds | Description |
|---|---|---|
EVENT_STATE_UPDATED |
all | The state changed (also emitted once with the initial state). |
EVENT_STATE_RESET |
local | _Reset() restored the default value. |
Functions
| Function | Kinds | Description |
|---|---|---|
_Clear() |
all | Sets the state to VRCUrl.Empty. |
_Reset() |
local | Restores Default Value. |
Where URLs come from
For security reasons, Udon cannot build a VRCUrl from a string at runtime. A URL value can therefore only receive
URLs that already exist as VRCUrl:
- typed by a player into a
VRCUrlInputField- see URL Input Field - authored in the inspector - as
Default Valueor in a URL Preset - received from another URL value (synchronized URLs are re-created by VRChat on every client)
There is no persisted URL value - VRChat’s player data does not support storing
VRCUrl.