Skip to content

Commit

Permalink
Fix setup audio source button not working
Browse files Browse the repository at this point in the history
  • Loading branch information
JLChnToZ committed Sep 30, 2024
1 parent b2cfe7a commit 952edd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Packages/idv.jlchntoz.vvmw/Editor/VVMW/CoreEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ void DrawAudioSourcesListHeader(Rect rect) {
var primaryAudioSource = audioSourcesProperty.arraySize > 0 ? audioSourcesProperty.GetArrayElementAtIndex(0).objectReferenceValue : null;
foreach (var handler in builtinPlayerHandlers) {
using (var so = new SerializedObject(handler)) {
so.FindProperty("primaryAudioSource").objectReferenceValue = primaryAudioSource;
var property = so.FindProperty("primaryAudioSource");
if (property != null) property.objectReferenceValue = primaryAudioSource;
so.ApplyModifiedProperties();
}
if (handler.TryGetComponent(out VRCUnityVideoPlayer unityVideoPlayer))
Expand Down

0 comments on commit 952edd6

Please sign in to comment.