Search Unity

[Request] Restart Scene Button in Editor Toolbar

Discussion in 'Editor & General Support' started by Shadow64, Jun 13, 2022.

?

As a developer would you use a restart button over stopping/starting game mode?

Poll closed Jun 20, 2022.
  1. Yes, that would be extremely helpful.

    50.0%
  2. Yes, but I've coded my own.

    0 vote(s)
    0.0%
  3. No, using stop/start is fast enough.

    0 vote(s)
    0.0%
  4. No, this could cause additional issues.

    50.0%
  1. Shadow64

    Shadow64

    Joined:
    Dec 16, 2013
    Posts:
    2
    If possible, it would be great if there was a restart scene button next to the other buttons in the Toolbar (Play, Pause, Step).

    You could just hit play twice, but that causes the editor to recompile. You could also code your own Scene Reloader prefab and just place it in every scene you create (which I've currently done) but the broad application required for that suggestion makes it clear that it should probably just be an editor feature. You'd also have to carefully disable it in every level if you didn't want it to be used in-game.

    The code to implement this in an object is just a few lines, so it doesn't at face value seem like it would break anything to be done at editor level.

    I'm sure it seems like it wouldn't save that much time, but depending on the size of a project and the system you're running it on, I think it could be a sizable gain since reloading from within the project is much faster than stopping and starting game mode and we're not talking about a once in a while action. Reloading the scene is something a dev might want to do for a variety of reasonable tests.

    Would love to see this as an engine feature and I hope you'll consider it.

    Thanks. :)