SuperTiled2Unity icon indicating copy to clipboard operation
SuperTiled2Unity copied to clipboard

SuperTiled2Unity version: 2.1.1, Unity version: 2022.3.17f1c1 Unknown error encountered. Please report as bug. Stack track is in the console output. Failed to add object of type `SuperTile`. Check that the definition is in a file of the same name and that it compiles properly.

Open 751500365 opened this issue 1 year ago • 1 comments

SuperTiled2Unity version: 2.1.1, Unity version: 2022.3.17f1c1 Unknown error encountered. Please report as bug. Stack track is in the console output. Failed to add object of type SuperTile. Check that the definition is in a file of the same name and that it compiles properly. image screenshot-20240430-104452 screenshot-20240509-181725

751500365 avatar May 09 '24 10:05 751500365

Hi there, @751500365. Are there any compile errors in the Unity Console window? It looks like something in the ST2U package didn't build correctly. Is it possible for me to get a copy of your project to debug further if needed?

Seanba avatar May 25 '24 20:05 Seanba

Hi - I am getting this error on every Tiled file (Levels, Tilesets), so currently can't load any maps.

image

Rich-DOGLtd avatar Dec 06 '24 18:12 Rich-DOGLtd

There are no compile errors.

Rich-DOGLtd avatar Dec 06 '24 18:12 Rich-DOGLtd

Hi there, @751500365. Are there any compile errors in the Unity Console window? It looks like something in the ST2U package didn't build correctly. Is it possible for me to get a copy of your project to debug further if needed?

I am happy to send you the project source if you need it.

Rich-DOGLtd avatar Dec 06 '24 18:12 Rich-DOGLtd

Hi there, @Rich-DOGLtd. Yes, if you can send me the project I'd be happy to investigate it further. I haven't seen this issue personally myself so I'm interested in finding out what's going on.

Seanba avatar Dec 06 '24 18:12 Seanba

Fantastic - thanks Sean. Will send link via email.

Rich-DOGLtd avatar Dec 06 '24 19:12 Rich-DOGLtd

I've just sent over the link - it is a zip archive on my Google Drive.

Rich-DOGLtd avatar Dec 06 '24 19:12 Rich-DOGLtd

Thanks, @Rich-DOGLtd. I was able to reproduce the bug in your project but I don't yet know the cause.

Can you try to force reimport the Super Tiled2Unity package under Packages/Super Tiled2Unity? And then take one of your tilesets and force reimport that as well?

That got things working for me though I still want to investigate more on what's going on here.

image

Seanba avatar Dec 06 '24 20:12 Seanba

@Rich-DOGLtd I think closing Unity, deleting your Library folder, and reopening Unity can fix things up for you too.

For some reason your project import is in a confused state and forcing everything to be reimported into your library can fix that up.

Seanba avatar Dec 06 '24 21:12 Seanba

Ah - ok, thanks Sean - I will give that a try. Thanks for taking a look :)

Richard

On Fri, 6 Dec 2024 at 21:12, Sean Barton @.***> wrote:

@Rich-DOGLtd https://github.com/Rich-DOGLtd I think closing Unity, deleting your Library folder, and reopening Unity can fix things up for you too.

For some reason your project import is in a confused state and forcing everything to be reimported into your library can fix that up.

— Reply to this email directly, view it on GitHub https://github.com/Seanba/SuperTiled2Unity/issues/268#issuecomment-2524183594, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNQJSGZTYSD52UQ7VM5CWQT2EIHLFAVCNFSM6AAAAABTFGVVI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRUGE4DGNJZGQ . You are receiving this because you were mentioned.Message ID: @.***>

Rich-DOGLtd avatar Dec 06 '24 21:12 Rich-DOGLtd

@Rich-DOGLtd after further testing I've confirmed that deleting your Library is the right move to fix most of your issues.

However, your Level01.tmx Tiled map is using multiple embedded tilesets and, after all this time, that's something ST2U hasn't accounted for. You'll still see errors like this for that map until I provide a fix which should be ready sometime tomorrow.

Thanks for helping me track this down.

Seanba avatar Dec 07 '24 03:12 Seanba

@Rich-DOGLtd I've posted version v2.2.3 of Super Tiled2Unity. After deleting your Library folder trying replacing your install of ST2U and re-open Unity.

Note that Unity 6 now requires this naming convention on ST2U as an embedded package: Packages/com.seanba.super-tiled2unity/ Because of this I've renamed the zip file to com.seanba.super-tiled2unity.zip.

Seanba avatar Dec 07 '24 05:12 Seanba

Thanks again Sean - the Leve01.tmx was something I was experimenting with to see if I could get the levels to work before I contacted you, so I'll revert back to how I had it previously with the external tilesets.

Rich-DOGLtd avatar Dec 07 '24 12:12 Rich-DOGLtd

Thanks, Rich. I'm going to close out the bug for now but let me know if you run into any other issues like this.

Seanba avatar Dec 08 '24 23:12 Seanba