Debugging a Broken Player - vrctxl/VideoTXL GitHub Wiki
In the world of Unity, VRChat, and Udon, sometimes things just break for weird reasons. Since the video player is a combination of several components it may not be obvious where to start looking.
My default video plays, but the controls don't work
(Note, you may have been sent here to debug the AudioLink Mini Player, which is a close relative of the VideoTXL Basic Sync Player. Although the exact paths described below are different, the underlying causes and solutions are the same)
This might be the most common problem. The core player component in SyncPlayer is fine, but there's a problem within the PlayerControls object.
If you just started a new project, updated the VRC SDK, deleted your project's library folder, or loaded a project from source control for the first time, check this first.
There is a known problem with the VRC SDK where the component "VRC URL Input Field" is missing on import. This is required by all video players for URL input, including the SDK's own example players.
Look at the node SyncPlayer/PlayerControls/MainPanel/LowerRow/InputField
. There should be a component on this object called VRC URL Input Field
. It should look like this:
If instead you see a missing script message, you're missing a component of the VRC SDK.
To fix the SDK, go to your project tab and navigate to VRCSDK/Plugins
. Right click VRCSDK
, and select Reimport
. After importing, you can expand out the contents of that object and you should see an entry called VRCUrlInputField
, near the end.
Cool, did that fix everything? If not, keep reading.
When your unity scene loads and the VRCUrlInputField component is missing, the component in your scene may lose information. The prefab that the controls came from may be broken too! Go back and look at that InputField node in your hierarchy. Does the VRC URL Input Field component have references to its Text and Placeholder objects? Are there events set for On Value Changed
and On End Edit
? If it doesn't look like the screenshot posted a bit earlier, you could try to fix up the object by hand, which means adding the two text references to the node's children, and setting the events pointing at the root PlayerControls node.
You can also try dragging a new instance of the PlayerControls prefab into your scene and setting the Video Player and Audio Manager references. Before doing this, you should try importing a fresh copy of the prefabs from the VideoTXL unity package, because the imported prefabs may be damaged from the missing SDK component.
The controls are still broken and it's not related to VRC Url Input Field
You may be seeing an issue related to serialized UdonSharp components being corrupted. This may be the case if the problem started happening after you updated the release of VideoTXL, especially if you've done any customization of the PlayerControls object.
Carefully look at the contents of the script component on SyncPlayer/PlayerControls
, including expanding the Internal Object References
section. If you see lots of missing references, or you see references where they clearly don't belong (e.g. Stop Icon
is referencing object IconPause
), then the serialization of the object is corrupt.
The easiest solution is to fully replace the PlayerControls object in your scene. However you may be able to restore it by clicking the ... menu for the script and selecting Modified Component->Revert
. If that option isn't available or didn't work, you may need to open the PlayerControls prefab itself, and select the same option if available. Between those two, that may be enough to restore the majority of the object references, but you may need to reassign your video player and audio manager references.