Saving scene via script in runtime

Updated on June 22, 2017 in [A] C# .Net
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
3 on June 21, 2017

HI, I break a prefab  of an object in lots of scenes. I have done a script that fix it, in the awake function, I’d like to don’t do that in the final game, to make it a bit lighter. So, i have to play a scene in the edior and save it with the same name, and at the end delete the function that contains the “fix”. QUESTION: how can I save the scene with the same name in runtime?

  • Liked by
Reply
2 on June 21, 2017

You can’t (at least not directly).
You’ll have to impement a custom save and load system for that.

 

on June 22, 2017

You’ll have to impement a custom save and load system for that. What does it mean?

save every gameobject modify?

Wise
on June 22, 2017

Save every game object’s state in a file. And then load that file and read from it on start.

 

Show more replies
  • Liked by
Reply
Cancel