question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importer logs warnings when reimporting a LDtk asset that's part of a prefab

See original GitHub issue

Summary

If your LDtk asset is part of a prefab, the importer will log warnings that names are not unique and that subsequent imports may not properly re-link.

Steps to reproduce

1. Add a LDtk asset under an empty parent object, make that parent object a prefab.

image

2. Reimport the LDtk asset.

image Warnings are logged to the console. image

Stuff that might help

Warnings logged to the console:

Creating missing Tilemap component for TilemapCollider2D in Missing Prefab (Dummy).

Creating missing Tilemap component for TilemapCollider2D in Missing Prefab (Dummy).

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy)/Transform, Type:Transform'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy)/Tilemap, Type:Tilemap'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy)/Transform, Type:Transform'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Identifier uniqueness violation: 'Name:6705443923001353219/Gunsmith Dungeon (Missing Prefab)/Missing Prefab (Dummy)/Tilemap, Type:Tilemap'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Cammincommented, Jul 15, 2021

I think I found my solution. The error was happening even before the import process was happening. So I think the problems were coming because prefabs were being imported before the LDtk projects were. By changing the LDtk project’s importer’s importQueuePriority, it now imports before prefabs do, and that fixed it, no more log warnings 😄

So what I believe was happening is that because the LDtk project was placed in a prefab, the LDtk project now becomes a dependency of the prefab, so that means that reimporting the LDtk project also means that the prefab gets reimported. And so because the prefab was being reimported first, It didn’t know how to exactly deal with the old LDtk project (because the LDtk project still needed to be reimported next).

So consider this fixed. This will come in the next update. Will close this issue when the update comes 🙂

1reaction
Cammincommented, Jul 16, 2021

The 2.1.4 update is now up which has a few bug fixes and better text contrast behind certain colors 👍 Feel free to post more issues if you have any 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

LDtkToUnity/Assets/LDtkUnity/CHANGELOG.md at master
Incremented importer version to force a reimport for every LDtk asset (Forgot about ... Fixed the scales of some entity prefabs to fit...
Read more >
Import logs attached to my prefab
So something happens during import that causes the log to be added. But I have no idea why or what might be in...
Read more >
Troubleshooting
To fix this, select the root LDtk project in the scene, and then revert the prefab overrides, which should revert any unexpected changes...
Read more >
Update 2.2.0 - LDtk to Unity by Cammin - itch.io
Fixed a bug where entity prefabs would not be instantiated correctly when both the LDtk project importer and prefabs import at the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found