Fix Collection value containers to use correct value assignment.

This commit is contained in:
Chandler Cox
2024-12-13 14:31:44 -06:00
parent 24266b64da
commit f57f57423c
2 changed files with 2 additions and 2 deletions

View File

@@ -301,7 +301,7 @@ namespace FlaxEditor.CustomEditors
_valueToSet = null;
// Assign value
if (val is IList l && l.Count == _values.Count)
if (val is IList l && l.Count == _values.Count && _values.Count > 1)
{
for (int i = 0; i < _values.Count; i++)
_values[i] = l[i];

View File

@@ -386,7 +386,7 @@ namespace FlaxEditor.CustomEditors
if (instanceValues.Count != Count)
throw new ArgumentException();
if (value is IList l && l.Count == Count)
if (value is IList l && l.Count == Count && Count > 1)
{
for (int i = 0; i < Count; i++)
{