- Home /
Using A Paused Test Run As Scene
Currently I'm working on a grid based game, and have a script run that takes any 3d object and then tiles it. The tiles initially know how high they are and each character knows how high a "step" they can take moving from tile to tile. However, I would like to be able to go in and edit further information into each tile, such as a movement cost or an affect to be had when someone is on that tile.
Since these tiles don't actually exist in the scene until the scene is started, I can't do that manually. Is there a way to use a paused scene as a scene? Or to keep objects in a test run? I don't have a good way to proceduraly generate the info the tiles need, but placing thousands of tiles by hand doesn't seem like fun either.
Edit: Alrighty, been dinging around with the unity editor extension, found some rather useful examples of changing the unity inspector guis and the like. Really nice and all, still not sure how this allows me to instantiate/change objects in the editor. Any example would be great.
This question has come up before, and there does not appear to be a way to stop the game and use the result. Given what you are doing, consider writing an Editor extension that uses your tile generation code. Then you could edit the tiles after your script has run.
Awesome, thanks for the answer. I guess I wasn't aware that editor extensions were a thing, I'll look into those though. As well as unity is documented I'm sure I'll find it easily enough.
If you select all the root objects in the Hierarchy while the game is paused and press Ctrl-C (copy), then stop the game, delete everything in the scene, and press Ctrl-V (paste) you will now have the scene as it was when the game was running. You can then save this as a new scene. (Just be careful you don't overwrite your original data!)
Your answer
Follow this Question
Related Questions
Editor Scripting: change selected objects layer with button press 0 Answers
If I create GameObjects in OnSceneGUI, how can I destroy them when my control is no longer selected? 1 Answer
Rotate Scene View camera 3 Answers
When I drop Environment Prefab in hierarchy 0 Answers
Why the colors in the game view are pink and not like in the scene view? 1 Answer