Best way to design chunk system

My game I’m working on is a prebuilt open-world unlike Minecraft. So the only way I think is to build/split the chunks right before build, using OnPreprocessBuild, then clearing all the gameobjects that have all saved into chunks from the scene, and then pack them into multiple scriptable objects or custom files that can be referenced. Is this the best way to do this?
Which means my editor will use a lot of memory, but not on build?
I’m wondering if there are any other workflow/way to approach chunk systems for prebuilt worlds, or even a chunk system within the editor itself?

hmmm I dont quite understand why you would do this OnPreprocessBuild, wouldnt that drasticly increase the building time every time you want to build your application?
wouldnt it be better to have the chunks already predefined within your assets instead of letting the system automaticly cut the chunks befor building?

in any way, if for what you are doing it is possible to predefine the chunks befor building, like having for instance an overarching game object (containing all objects within a chunk as children) per chunk, you could just use a prefab per chunk for that

and if you want to avoid loading in all chunks at once, then you could use Adressables, allowing you to uncouple assets into their own sub-build and load/ unload them on runtime

Hmm, I thought that would be bad for workflow, like is it not that when I want to edit a part of the world, let’s say involving several chunks, wouldn’t that be troublesome?

Edit: I assume that it requires like locating my chunk prefab (whether in the scene or as asset) and then finding the objects I want to edit to finally make modifications, right?

yes thats true