Skip to content

Commit 45ce1f8

Browse files
committed
fix: Fixed exception in ExtEvents related to TypeReference
1 parent 5ed1709 commit 45ce1f8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Editor/Util/SerializedTypeReference.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ public string TypeNameAndAssembly
3636
public bool SuppressLogs
3737
{
3838
get => _suppressLogs.boolValue;
39-
set
40-
{
41-
_suppressLogs.boolValue = value;
39+
set => SetSuppressLogs(value, true);
40+
}
41+
42+
public void SetSuppressLogs(bool value, bool applyImmediately)
43+
{
44+
_suppressLogs.boolValue = value;
45+
46+
if (applyImmediately)
4247
_parentObject.ApplyModifiedProperties();
43-
}
4448
}
4549

4650
public bool TypeNameHasMultipleDifferentValues => TypeNameProperty.hasMultipleDifferentValues;
@@ -80,7 +84,6 @@ public void SetType(Type type)
8084
{
8185
TypeNameProperty.stringValue = TypeReference.GetTypeNameAndAssembly(type);
8286
_guidProperty.stringValue = TypeReference.GetClassGUID(type);
83-
_parentObject.ApplyModifiedProperties();
8487
}
8588

8689
private static string GetClassGuidFromTypeName(string typeName)

0 commit comments

Comments
 (0)