Ok cool, thank you...
I've never really done any asset loading and saving outside of text/xml and bin read/write. I've never even created a prefab from code, hehe, I guess I'll have to look thru the docs some.
I'm not sure what you mean by saving the game objects recursively, you mean like recursing up a tree, where you call whatever function inside itself, moving to children and parents?
I think I mostly get it, just not totally clear. I think you are saying...
1. Created and edit the tilemap object, commit it into a chunk.
2. Instantiate a clone of the entire RenderData object(RenderData->Layer0->Chunk0)
Don't need to do anything with the tilemap object or the asset data files?
3. Save this clone as a prefab"AssetDatabase.CreateAsset(clone, "path");"
This creates a .prefab???
4. Find all meshes and mesh collider from the clone "GetComponentsinChildren<Mesh(Meshfilter??) / MeshCollider>", and add them to the new saved prefab with "AssetDatabase.AddObjectToAsset(mesh, "path");" ??
At that point how does the mesh know which sprite cords to pull from the collection atlas? Or is that part of the meshfilter or something that gets saved out?
Thank you so much btw!!!!