Fix default value in Editor when it's null for value-type

This commit is contained in:
2026-09-14 06:59:01 +02:00
parent 0fc3972cea
commit f83d853e5d
@@ -297,6 +297,11 @@ namespace FlaxEditor.CustomEditors
else if (Type.Type == typeof(long))
_defaultValue = Convert.ToInt64(_defaultValue);
}
else if (_defaultValue == null && Type.IsValueType)
{
// Use zero value for value-types that have null as default value for some reason
_defaultValue = Type.CreateInstance();
}
}
}
if (instanceValues._hasReferenceValue)