Merge branch 'fix-collection-value' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-collection-value
This commit is contained in:
@@ -301,7 +301,7 @@ namespace FlaxEditor.CustomEditors
|
|||||||
_valueToSet = null;
|
_valueToSet = null;
|
||||||
|
|
||||||
// Assign value
|
// 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++)
|
for (int i = 0; i < _values.Count; i++)
|
||||||
_values[i] = l[i];
|
_values[i] = l[i];
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ namespace FlaxEditor.CustomEditors
|
|||||||
if (instanceValues.Count != Count)
|
if (instanceValues.Count != Count)
|
||||||
throw new ArgumentException();
|
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++)
|
for (int i = 0; i < Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user