Hello Guest

Author Topic: Tilemap chaos  (Read 5071 times)

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Tilemap chaos
« on: May 20, 2014, 01:58:44 pm »
Ok - I have NO idea what I did, so I am completely unable to replicate but one of my Tilemaps is beyond broken right now and I have no idea how to recover it. All I know is that I saw two instances of the same tilemap object in my scene (assuming I accidentally duplicated it in the scene doing some keyboard shortcuts without realizing it). So I removed one and now I keep getting this error:

Code: [Select]
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
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.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
UnityEditor.DockArea:OnGUI()

I have tried everything and my map is corrupt. If I try and edit/commit it it keeps adding a new instance of the TileMapRenderData. Everything is spiraling out of control and I have no idea how to regain access to the tilemap. The render data is visible, but colliders aren's showing up and I am unable to paint. Please if there is anything to do that doesn't require me completely re-doing the map that would be great. Thanks!

BTW - using the latest version 2.5.1

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap chaos
« Reply #1 on: May 20, 2014, 02:00:07 pm »
Can you get me a stripped down repro? That will make things significantly easier to track down

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap chaos
« Reply #2 on: May 20, 2014, 02:10:10 pm »
I'll try to - project is pretty massive at this point. Thanks.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap chaos
« Reply #3 on: May 20, 2014, 02:19:04 pm »
Unity crashed and now my scene is completely missing - I swear I'm not crazy. Going to pull yesterday's version from GitHub.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap chaos
« Reply #4 on: May 20, 2014, 03:33:18 pm »
I managed to revert to yesterdays version, but it was still having the same issue. I did some tinkering with the tilemap, edit/re-commit and deleting a bunch of the duplicated renderDatas and it now seems to be working fine.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap chaos
« Reply #5 on: May 20, 2014, 07:18:33 pm »
This is really strange. If this is happening something must be happening to trigger it. Let me know if it does, and try to create a stripped down sample, that will really go a long way in debugging something liek this.