Skip to content

Commit cb5668a

Browse files
committed
Update Taggable.cs
1 parent 6a20e66 commit cb5668a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Taggable.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,19 @@ private void SetupEditorData()
8787
_all = Resources.FindObjectsOfTypeAll<Tag>();
8888

8989
if (_tags == null)
90+
{
9091
_tags = new Tag[0];
92+
}
93+
else
94+
{
95+
for (int i = _tags.Length - 1; i >= 0; i--)
96+
{
97+
var tag = _tags[i];
98+
99+
if (tag == null)
100+
ArrayUtility.RemoveAt(ref _tags, i);
101+
}
102+
}
91103

92104
if (_hash == 0)
93105
_hash = gameObject.GetHashCode();

0 commit comments

Comments
 (0)