Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

save/load cloned game object

Discussion in 'Scripting' started by yusuf1994, Sep 28, 2013.

  1. yusuf1994

    yusuf1994

    Joined:
    Jul 7, 2012
    Posts:
    19
    i'm trying to clone game object in the scene , when i close the game then open it next time i want it exist in the scene with object position .
    how to do that :confused:?

    peace :)
     
  2. fire7side

    fire7side

    Joined:
    Oct 15, 2012
    Posts:
    1,819
    PlayerPrefs would probably be the simplest.
     
  3. yusuf1994

    yusuf1994

    Joined:
    Jul 7, 2012
    Posts:
    19
    hi

    in strategy games i build a buildings , after i close the game then open it next time the buildings (witch i built) is still exist .

    how to do that with PlayerPrefs , or is there anything else .

    thanks and sorry for my english.
     
  4. oneXwork

    oneXwork

    Joined:
    Mar 3, 2011
    Posts:
    260
    Using PlayerPrefs to save the building data like position,it's prefab that you need to build it and so on.....
    then when you load the game,recreate the build with the data from playerprefs...
     
  5. yusuf1994

    yusuf1994

    Joined:
    Jul 7, 2012
    Posts:
    19
    thank you , i know how to use PlayerPrefs but i want it exist in the scene when i load it

    so how to do that ?
     
unityunity