From f1d9652b69d9bcbcbecc57ac50afc40dd1841eed Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 9 Oct 2023 01:53:46 -0700 Subject: [PATCH] small potential fix --- Assets/LDtkUnity/CHANGELOG.md | 1 + Assets/LDtkUnity/Runtime/Fields/LDtkFields.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/LDtkUnity/CHANGELOG.md b/Assets/LDtkUnity/CHANGELOG.md index 137ebf304..3218dfa6a 100644 --- a/Assets/LDtkUnity/CHANGELOG.md +++ b/Assets/LDtkUnity/CHANGELOG.md @@ -15,6 +15,7 @@ - Updated samples to 1.4.1 - Updated docs to instruct that a texture should be RGBA32 compression - Made the LDtkComponentLayer ordered before the LDtkIid component +- Fixed a possible exception during initialization of LDtkFields ### Breaking Changes - Removed the "De-parent in Runtime" feature from the project importer diff --git a/Assets/LDtkUnity/Runtime/Fields/LDtkFields.cs b/Assets/LDtkUnity/Runtime/Fields/LDtkFields.cs index f7a3d9948..e41f4e1f7 100644 --- a/Assets/LDtkUnity/Runtime/Fields/LDtkFields.cs +++ b/Assets/LDtkUnity/Runtime/Fields/LDtkFields.cs @@ -14,7 +14,7 @@ namespace LDtkUnity public partial class LDtkFields : MonoBehaviour { internal const string PROPERTY_FIELDS = nameof(_fields); - [SerializeField] private LDtkField[] _fields; + [SerializeField] private LDtkField[] _fields = Array.Empty(); private readonly Dictionary _keys = new Dictionary();