Hello Guest

Author Topic: Errors with tilemaps after moving resources to another project  (Read 3462 times)

MaddoScientisto

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
I have a bunch of sprite collections which I moved to another project, along with tilemapdata and tilemapeditordata assets, then I made a tilemap from scratch in a scene but now I'm getting weird behaviors such as the following error when editing tilemap:
Quote
NullReferenceException
tk2dRuntime.TileMap.BuilderUtil.HideTileMapPrefabs (.tk2dTileMap tileMap) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs:280)
tk2dTileMap.BeginEditMode () (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:547)
tk2dTileMapEditor.OnInspectorGUI () (at Assets/TK2DROOT/tk2dTileMap/Editor/tk2dTileMapEditor.cs:1152)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1150)
UnityEditor.DockArea:OnGUI()

And this when committing:
Quote
NullReferenceException
tk2dRuntime.TileMap.BuilderUtil.HideTileMapPrefabs (.tk2dTileMap tileMap) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs:280)
tk2dTileMap.ClearSpawnedInstances () (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:225)
tk2dTileMap.Build (BuildFlags buildFlags) (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:304)
tk2dTileMap.EndEditMode () (at Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs:526)
tk2dTileMapEditor.OnInspectorGUI () (at Assets/TK2DROOT/tk2dTileMap/Editor/tk2dTileMapEditor.cs:1174)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1150)
UnityEditor.DockArea:OnGUI()

After this there are inconsistencies with the tilemap render data, sometimes background doesn't show up until I edit the tilemap or colliders aren't applied at all.

I even tried to remake the sprite collection from scratch and use the new one in a new tilemap, same thing happens.

Are there some files I shouldn't have copied? I also tried to rebuild index and rebuild all sprites but this still happens

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Errors with tilemaps after moving resources to another project
« Reply #1 on: April 12, 2015, 02:10:41 pm »
I take it you've moved the associated meta files across correctly?
If this is still broken, please upload a repro case in the private support forums / email support and I'll take a look.

MaddoScientisto

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Errors with tilemaps after moving resources to another project
« Reply #2 on: April 12, 2015, 08:25:04 pm »
There's also a lot of graphical errors on the side of tiles, it's as if it's rendering parts of other tiles at times, I did set the pad mode to extend though and it used to work before the move.

Is there something I can delete so everything can regenerate correctly?