Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The object you are trying to replace does not exist or is not a Prefab." #182

Closed
Avalin opened this issue Oct 12, 2018 · 6 comments
Closed

Comments

@Avalin
Copy link

Avalin commented Oct 12, 2018

I get this error when I use Tiled2Unity it in Unity version 2018.3.0b1

The object you are trying to replace does not exist or is not a Prefab.
UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
Tiled2Unity.ImportTiled2Unity:CreatePrefab(XElement, ImportBehaviour) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Prefab.cs:97)
Tiled2Unity.ImportTiled2Unity:ImportAllPrefabs(ImportBehaviour) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Prefab.cs:47)
Tiled2Unity.ImportTiled2Unity:MeshImported(String) (at Assets/Tiled2Unity/Scripts/Editor/ImportTiled2Unity.Mesh.cs:39)
Tiled2Unity.TiledAssetPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Tiled2Unity/Scripts/Editor/TiledAssetPostProcessor.cs:98)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

Edit: My solution for now has been to downgrade. It works fine as of 2018.2.11f1 :)

@Seanba
Copy link
Owner

Seanba commented Nov 2, 2018

Hi Avalin, I would guess the was an earlier error with importing your map file that is stopping the new prefab from being created. If you send me your project as a Unity Package I can try to debug.

BTW, you may have better luck with SuperTiled2Unity - the new way of getting Tiled assets in Unity. Thanks.

@Simnaan
Copy link

Simnaan commented Mar 20, 2019

I'm getting the same problem on Unity18.3.8f1 and I can't find a solution to this problem please help!!!
I've tried using SuperTiled2Unity but I still can't import tiled maps into unity.

@seanb-22ct
Copy link
Contributor

I'm not sure Tiled2Unity will still work with Unity 18.3.8f1. What issues are you having with SuperTiled2Unity?

@Simnaan
Copy link

Simnaan commented Mar 20, 2019

I import all the files for the map and then it just loops back and tells me to add the files I just added in again

@seanb-22ct
Copy link
Contributor

Hi again, @Simnaan. Are the relative paths for your TMX, TSX, and texture files still intact? I would guess the problem is that you copied the files into your Unity project, perhaps into the same folder, and that broke the relative paths?

You can send me your project (sean@seanba.com) and I can check that for you.

@seanb-22ct
Copy link
Contributor

If you check the error that is being reporting it is telling you where it expects the files referenced by your TMX to exist. My bet is that you have them in the wrong location.

Try opening your imported TMX in Tiled. You should be getting similar errors there. Tiled will also give you the chance to "find" the files again (which changes the relative path). This is probably your fatest/best way to fix.

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

No branches or pull requests

4 participants