0
\$\begingroup\$

I would like to use Unity scenes (as it's visually easy to create levels) but I want to modify them as the player interacts (for instance, if the player broke a glass, the glass should be broken every time player returns to the scene or restarts the game). So, how I can do it?

It's a 2d top-down game I'm working on.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Are the objects static in your scene and it is more like a state of your game? Or can I throw any object from my inventory against the wall and it should be the same when you come back? \$\endgroup\$ Commented Feb 23, 2022 at 20:24
  • 3
    \$\begingroup\$ You cannot save changes a player made to the game into the scene file itself. What you can do is make your own save file that records the alterations made to the scene, and the next time you load that scene you also load the save file and perform any alterations it recorded. The specifics of this will of course depend on what specific alterations you want to support. Try reviewing existing Q&A about save games and serialization in Unity, and edit your question to focus on one specific step in the process you need help with. \$\endgroup\$ Commented Feb 23, 2022 at 23:37
  • \$\begingroup\$ Oh, so there's no way to change a scene itself. Thanks! \$\endgroup\$ Commented Feb 24, 2022 at 5:46

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.