Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MaddoScientisto

Pages: [1]
1
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?

2
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

3
Support / Re: Serializing and Deserializing Tile Map
« on: April 11, 2015, 11:48:40 am »
Thank you for the answer!

instead of rawtile I used
Code: [Select]
var flags = square._tileMap.GetTileFlags(i, j, l);
var tileId = square._tileMap.GetTile(i, j, l);
(where i is tile x, j is tile y and l is layer, I discard tiles -1)

is it the same thing?


Also I didn't think about loadleveladditive, that sounds really good, also because it seems to have an async version.

My goal is to make a big map like metroid but of course just load the "rooms" (rooms are a collection of tilemaps).
I wanted to be able to have the whole map loaded in the editor at the same time to properly place everything but maybe I can just do the serialization thing for the editor and load the maps the way you said ingame instead.

I'l look into it and I'll post my serialization code for somebody who might stumble into this post later, if I do end up doing the serialization.

4
Support / Serializing and Deserializing Tile Map
« on: April 10, 2015, 02:08:36 pm »
I've purchased this great toolkit about a week ago and I've been very pleased so far by the possibilities it offers.

I have made a few TileMaps and I've been writing code to piece the maps together into bigger maps, so far I've been saving each TileMap as a prefab and loading them up. This is getting too cumbersome though, I'd rather just serialize the map to a text/xml/whatever file and then both in the editor and ingame just load up that file, instance a new tilemap and build it back up according to the previously saved data.

I've been looking at the documentation and tried to make a few loops to try and catch all the data so right now I have the following for each tile:
- tile id
- tile coordinates
- tile flags (saved as string for now because I have no idea what they are supposed to contain yet)
- tile color (saved as string but I have no idea what it can be used for)
- tile layer number

Also I grabbed the editorDataGUID and the name of the "data" object.

Where is data stored?
Where is color stored (was it just that color variable from the tile?)?

Is this information enough to rebuild a fully working tilemap object?

Pages: [1]