Merge branch 'fix-collection-value' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-collection-value

This commit is contained in:
Wojtek Figat
2024-12-16 22:58:02 +01:00
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++)
{