Script that had ability to works on unity editor

Hello firends,

I currently working at 2D after learning 3D’s unity workflow. When I was child I played few games that had level editor, Banana, lode runner, wrecking crew, match rider, excitebike. They all on nes or Tenchu 2 on ps1.

Inspired from all game above, I want to make a scripts that can handle:

  1. generate level
    I realized generate level don’t have to do everytime level load, so I want to make this function works on editor and runtime too. After level generated, it can be saved depends user wish. Basically I want to make it similar with baking navmesh.

  2. Editing level
    I know tilemap can do this but can I make it also works on runtime?

That’s all, thank you for the time.

You cannot make a game that uses Unity’s Editor as part of the game, because Unity Editor isn’t part of the game executable that you distribute. This means that you’ll have to write the entire level editor code yourself.

So I must make game features that similar like tilemapping? and then my workflow will be like:
Build game that contains external levels/stage data → making levels/stage data with the game just I build → packing external level/stage into 1 installment and shorting it will be default level or used into kind of campaign mode.

I can’t explained my idea but it will be similar with super mario maker