Why I ❤this channel: Came here to learn about Tilemaps Encountered local functions for the first time Learned about both. Better game dev Better software dev 20/10, video did the job of two videos
You didn't tackle the Deserialize() part of the Level struct. Would you do it with string.Split() or string.IndexOf or similar string manipulation? Or do you have another (maybe more efficient) approach?
Thanks for the video, some interesting points there. BTW, it would not probably be a good idea to ever serialize those scriptable objects into json as is, those tile instance IDs can change AFAIK. So after adding or removing some stuff from project and then loading a level might not work as expected, even if the save/load was editor only feature. I guess you already know this, but there is that pretty print parameter for JSONUtility which outputs the data with line breaks and indentations, it is pretty useful when you need to read that data in text editor.
You're right, you should never serialize a ScriptableObject. It was naughty of me to use it as an example. Hopefully viewers don't stop the video right there and take it to heart without listening to the following advice, heh.
Hi @Tarodev it's very very useful tutorial, I have modified your tutorial into very efficient with combine between Scriptable Objects and Tile, so I can call the tiles after I quit the game, Thanks for the tutorials!
is there a good solution if I have a mix of RuleTiles, AnimatedTiles and normal Tiles? do I have to create individuell "LevelTiles" and save them in different Lists ?
Hi, I use this save and load system to load/unload chunks in my tilemap, it works but, when i load a chunk this have a little lag :( , i try changing the max tile change count from my tilemap collider 2d to a lower number but, this only made it slightly better Can you think of any way to fix that?
The problem was that the collider 2d mesh didn't have a simple geometry and that's why it took so long to load and save, currently this system works perfectly for me :)
Why don't you just create the scriptableobject at the start, then add and remove SavedTile objects as you place them at runtime? No need to look through the tilemap :)
Why I ❤this channel:
Came here to learn about Tilemaps
Encountered local functions for the first time
Learned about both.
Better game dev
Better software dev
20/10, video did the job of two videos
Just perfect tutorial. Was a bit scared you wouldnt show how to save to json there but glad you decided to.
You didn't tackle the Deserialize() part of the Level struct. Would you do it with string.Split() or string.IndexOf or similar string manipulation? Or do you have another (maybe more efficient) approach?
In my implementation I used string.split, and used commas and brackets as seperators
Hey man can you please share the code? I couldn't figure out how to doit@@LethalChicken77
Dude, you are so underrated!!! Thank you so much for the video and you have helped me a lot! keep up the good work
Thank you so, so much! This video has helped me immensely. It should have 10x more views, man!
Exactly what I needed! Thanks!!
You're welcome ❤️
Thanks for the video, some interesting points there. BTW, it would not probably be a good idea to ever serialize those scriptable objects into json as is, those tile instance IDs can change AFAIK. So after adding or removing some stuff from project and then loading a level might not work as expected, even if the save/load was editor only feature. I guess you already know this, but there is that pretty print parameter for JSONUtility which outputs the data with line breaks and indentations, it is pretty useful when you need to read that data in text editor.
You're right, you should never serialize a ScriptableObject. It was naughty of me to use it as an example. Hopefully viewers don't stop the video right there and take it to heart without listening to the following advice, heh.
Cool, thanks so much for your time and consideration
Love the video man! However I couldn't figure out how to deserialize the more optimized way you showed at the end. Can you please help with that?
Nice, when I finish the videos of the tactics games I search for how to do exactly this!!!
Awesome piece of content.
Hi @Tarodev it's very very useful tutorial, I have modified your tutorial into very efficient with combine between Scriptable Objects and Tile, so I can call the tiles after I quit the game, Thanks for the tutorials!
Really nice tutorial! The only thing that was really missing was how to unserialize the .txt file but good overall!
Also, Inspector GUI sounds like a show on BBC.
Amazing vidoe. Helped me a lot!
Subscribers++;
I'm crunching on a game and this might just save some features from the chopping block. Thank you!
Thanks for the video!
is there a good solution if I have a mix of RuleTiles, AnimatedTiles and normal Tiles? do I have to create individuell "LevelTiles" and save them in different Lists ?
Yeah, I created a LevelRuleTile and gave it its own tilemap. Only minor changes to the code were necessary.
Hi, I use this save and load system to load/unload chunks in my tilemap, it works but, when i load a chunk this have a little lag :( , i try changing the max tile change count from my tilemap collider 2d to a lower number but, this only made it slightly better
Can you think of any way to fix that?
It should be async save and load (dont really into it)
The problem was that the collider 2d mesh didn't have a simple geometry and that's why it took so long to load and save, currently this system works perfectly for me :)
I need level editor ingame, with tilemaps and layers😥
I humbly request you zoom into your code editor :)
I do in new videos 😊 I've learned!
Cool :)
Why don't you just create the scriptableobject at the start, then add and remove SavedTile objects as you place them at runtime? No need to look through the tilemap :)
That was my thought process as well
Is it possible to use this script with rule tiles? When I try to safe a rule tile to my level the "Tile" field stays empty
Don't try to serialize the entire rule tile, save the tile type and position. When you load you check that it's a rule tile and lay it down
@@Tarodev Could you explain it a bit, I have no Idea what I should do
thanks for helpng me
Glad it helped you 😊
My personal favorite solution to this is to simply not. Unfortunately sometimes it is required.
Enums don't have to have Serializable attribute. :)
Indeed. I serialize them to see them in the inspector (I don't remember if I used them in the inspector in this video)
Пригодится
Making me google translate :P
That is NOT the use of the word save I though you were going for :P I thought you were "saving" the tilemap feature from being bad :)
I am only human 😂
Ha ha :D In all seriousness, it's not as bad as I first thought. I think I'm finally getting the hang of it. Took a few months though!
Damn. That's why I kinda hate Unity. Such a commonly needed functionality have to be coded using all sorts of crutches...
Like serializing and saving tile maps? Yeah... I agree things like this should be native
Why unity does not provide this basic function?