com.wallstop-studios.unity-helpers 2.0.0-rc71 → 2.0.0-rc73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Editor/PrefabChecker.cs
CHANGED
|
@@ -573,13 +573,12 @@
|
|
|
573
573
|
int index = 0;
|
|
574
574
|
if (list is Object unityObject)
|
|
575
575
|
{
|
|
576
|
-
if (unityObject == null)
|
|
576
|
+
if (list.GetType() != typeof(Transform) && unityObject == null)
|
|
577
577
|
{
|
|
578
578
|
unityObject.LogError(
|
|
579
579
|
$"Field '{field.Name}' ({field.FieldType.Name}) on component '{componentType.Name}' has a null enumerable."
|
|
580
580
|
);
|
|
581
581
|
}
|
|
582
|
-
// Ignore all enumerable unity objects, they're spooky
|
|
583
582
|
continue;
|
|
584
583
|
}
|
|
585
584
|
foreach (object element in list)
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
using System.ComponentModel;
|
|
6
6
|
using System.Linq;
|
|
7
7
|
using System.Text;
|
|
8
|
+
using System.Text.Json.Serialization;
|
|
8
9
|
using Core.Extension;
|
|
9
10
|
using Core.Helper;
|
|
10
|
-
|
|
11
|
+
#if ODIN_INSPECTOR
|
|
11
12
|
using Sirenix.OdinInspector;
|
|
13
|
+
#endif
|
|
12
14
|
|
|
13
15
|
[Serializable]
|
|
14
16
|
public sealed class AttributeEffect :
|
|
@@ -219,7 +221,9 @@
|
|
|
219
221
|
|
|
220
222
|
for (int i = 0; i < effectTags.Count; ++i)
|
|
221
223
|
{
|
|
222
|
-
if (
|
|
224
|
+
if (
|
|
225
|
+
!string.Equals(effectTags[i], other.effectTags[i], StringComparison.Ordinal)
|
|
226
|
+
)
|
|
223
227
|
{
|
|
224
228
|
return false;
|
|
225
229
|
}
|
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
public static bool operator ==(AttributeModification lhs, AttributeModification rhs)
|
|
27
27
|
{
|
|
28
|
-
|
|
29
|
-
return string.Equals(lhs.attribute, rhs.attribute)
|
|
30
|
-
&& lhs.action == rhs.action
|
|
31
|
-
&& lhs.value == rhs.value;
|
|
28
|
+
return lhs.Equals(rhs);
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
public override bool Equals(object obj)
|
|
@@ -36,16 +33,16 @@
|
|
|
36
33
|
return obj is AttributeModification other && Equals(other);
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
public override int GetHashCode()
|
|
40
|
-
{
|
|
41
|
-
return Objects.HashCode(attribute, action, value);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
36
|
public bool Equals(AttributeModification other)
|
|
45
37
|
{
|
|
46
38
|
return string.Equals(attribute, other.attribute, StringComparison.Ordinal)
|
|
47
39
|
&& action == other.action
|
|
48
40
|
&& value.Equals(other.value);
|
|
49
41
|
}
|
|
42
|
+
|
|
43
|
+
public override int GetHashCode()
|
|
44
|
+
{
|
|
45
|
+
return Objects.HashCode(attribute, action, value);
|
|
46
|
+
}
|
|
50
47
|
}
|
|
51
48
|
}
|