We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f7b2c3 commit 0d0b263Copy full SHA for 0d0b263
1 file changed
Scripts/Runtime/Core/CollectionItemPicker.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
+using System.Text;
5
using UnityEngine;
6
using UnityEngine.Serialization;
7
@@ -352,5 +353,24 @@ public void OnAfterDeserialize()
352
353
{
354
isDirty = true;
355
}
356
+
357
+ public override string ToString()
358
+ {
359
+ if (Items.Count == 0)
360
+ return "[]";
361
362
+ StringBuilder builder = new StringBuilder();
363
+ builder.Append('[');
364
+ for (int i = 0; i < Items.Count; i++)
365
366
+ if (i > 0)
367
+ builder.Append(", ");
368
369
+ TItemType item = Items[i];
370
+ builder.Append(item != null ? item.name : "<null>");
371
+ }
372
+ builder.Append(']');
373
+ return builder.ToString();
374
375
-}
376
+}
0 commit comments