Fixed a bug when trying to deserialize a null type with FromJson.
This commit is contained in:
parent
e5a5157b3c
commit
f781ad7373
@ -12,7 +12,7 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
||||
|
||||
#if UNITY_2021_3_OR_NEWER
|
||||
// NOTE: managedReferenceValue getter is available only in Unity 2021.3 or later.
|
||||
if (property.managedReferenceValue != null)
|
||||
if (property.managedReferenceValue != null && type != null)
|
||||
{
|
||||
// Restore an previous values from json.
|
||||
string json = JsonUtility.ToJson(property.managedReferenceValue);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user