Skip to content

Commit 7edd58c

Browse files
Updated SystemType deserialization method
1 parent 9d1981f commit 7edd58c

File tree

1 file changed

+1
-13
lines changed
  • Assets/MixedRealityToolkit/_Core/Definitions/Utilities

1 file changed

+1
-13
lines changed

Assets/MixedRealityToolkit/_Core/Definitions/Utilities/SystemType.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,7 @@ public SystemType(Type type)
5959

6060
void ISerializationCallbackReceiver.OnAfterDeserialize()
6161
{
62-
if (!string.IsNullOrEmpty(reference))
63-
{
64-
type = Type.GetType(reference);
65-
66-
if (type == null)
67-
{
68-
Debug.LogWarning($"'{reference}' was referenced but class or struct type was not found.");
69-
}
70-
}
71-
else
72-
{
73-
type = null;
74-
}
62+
type = !string.IsNullOrEmpty(reference) ? Type.GetType(reference) : null;
7563
}
7664

7765
void ISerializationCallbackReceiver.OnBeforeSerialize() { }

0 commit comments

Comments
 (0)