Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

saving state of a scene and then reloading

Discussion in 'Scripting' started by jevanswow, Jun 14, 2015.

  1. jevanswow

    jevanswow

    Joined:
    Apr 17, 2015
    Posts:
    33
    I was able to get some help on why a game object is respawning even after it was destroyed when I go from one level to another and then back. I tried using playerprefs to save the current state of the level and then load but nothing seems to be working.

    If anyone can point me in the right direction on what I need to do and while I hate to ask this unless I'm completely stumped, if anyone can give me the C# code that would also help as well.

    Thanks
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    No one's going to write your game for you.

    What aspect are you struggling with? Share the code you've created that doesn't work and we'll be happy to help.
     
  3. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    987
  4. jevanswow

    jevanswow

    Joined:
    Apr 17, 2015
    Posts:
    33
    Thanks for the response you two. Grozzler I can understand that asking for the code is the wrong way to go and I hate to do that but that's where I'm usually get stuck at. Whenever I ask for code it's because I honestly don't know the exact code for it. I know about the documentation but reading the documentation is like buying a code book. There's stuff in there that's very helpful and stuff that I already know or I really don't need. In any case thanks for the reply and thanks for the link HiddenMonk