Changed to replace labels and subParameters of Control with an empty array if they are null.

This commit is contained in:
raiti-chan 2023-05-18 19:24:15 +09:00 committed by bd_
parent f7cec4d435
commit 9f0522b273

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using VRC.SDK3.Avatars.ScriptableObjects;
@ -53,8 +54,8 @@ namespace nadena.dev.modular_avatar.core.menu
this.subParameters = control.subParameters?.Select(p => new VRCExpressionsMenu.Control.Parameter()
{
name = p.name
})?.ToArray();
this.labels = control.labels?.ToArray();
})?.ToArray() ?? Array.Empty<Parameter>();
this.labels = control.labels?.ToArray() ?? Array.Empty<Label>();
}
}