Skip to content

Fix: entries removed from Groups window not re-created on reimport - #98

Open
takararei wants to merge 1 commit into
favoyang:masterfrom
takararei:fix-reimport
Open

Fix: entries removed from Groups window not re-created on reimport#98
takararei wants to merge 1 commit into
favoyang:masterfrom
takararei:fix-reimport

Conversation

@takararei

Copy link
Copy Markdown
  • Unity 2022.3.38f1
  • com.littlebigfun.addressable-importer v0.16.1
  • com.unity.addressables v1.21.21

When an Addressable asset entry is manually removed from the Addressables Groups window, reimporting the asset (" Check Folder") .logs "Entry created/updated for ..." but the asset does not reappear in its group . the inspector shows no Addressable checkbox.

Manually removing an entry from the Groups window leaves behind a "zombie entry" in AddressableAssetSettings.FindAssetEntry still returns a non-null AddressableAssetEntry, and its parentGroup property still references the original group.

if (entry == null || entry.parentGroup != group)

Fix
Added a third check that verifies the entry is actually present in the group's entries collection

var isInGroup = entry != null && entry.parentGroup != null && entry.parentGroup.entries.Contains(entry);
if (entry == null || entry.parentGroup != group || !isInGroup)
    entry = settings.CreateOrMoveEntry(guid, group);

Added check for 'zombie entry' in AddressableImporter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant