Search Unity

How can i get back the instantiated objects with their tag,positions,Rotations?

Discussion in 'Scripting' started by Sohail1234, Jan 18, 2018.

?

How to save no. of instantiated objects with their tag and position on quit nd reload again on reope

  1. Any

    0 vote(s)
    0.0%
  2. Any

    0 vote(s)
    0.0%
Multiple votes are allowed.
Thread Status:
Not open for further replies.
  1. Sohail1234

    Sohail1234

    Joined:
    Jul 6, 2017
    Posts:
    5
    i want to save the positions,rotations and tags of all instantiated objects when i quit game and get back number of instantiated objects and assign them their positions,rotation and tag when reopen my game in android mobile?
    i tried it with playerprefs but its not working properly,it miss some of instantiated objects when i reopen my game.i have attached script which i am using but its not working properly
    Please guide with proper solution,i have research it but could get any proper solution.
    Thank you for help.
     
    Last edited: Jan 18, 2018
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    You could try this for some help: https://unity3d.com/learn/tutorials/topics/scripting/persistence-saving-and-loading-data

    There's another Utility built into Unity called JsonUtility. You can search for information on that - it's pretty straightforward.

    Hope that helps.

    PS. If you're looking to post code on the forums, read this page: https://forum.unity.com/threads/using-code-tags-properly.143875/

    People generally don't want to have to download a file to discuss some code in a question/post :)
     
    Sohail1234 likes this.
  3. Sohail1234

    Sohail1234

    Joined:
    Jul 6, 2017
    Posts:
    5
    Thankx for the help i have done it btw :)
    i have got an plugin Let me upload that for future use for others.
     
  4. Sohail1234

    Sohail1234

    Joined:
    Jul 6, 2017
    Posts:
    5
    it works perfectly :)
     
    whileBreak likes this.
  5. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Is that an asset from the asset store you posted?
     
    Sohail1234 likes this.
  6. Sohail1234

    Sohail1234

    Joined:
    Jul 6, 2017
    Posts:
    5
    yeah i got it from torrent but also available on assetstore updated version but it works fine for me
     
  7. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    This is getting a screenshot and going on my wall.

    You cannot download paid assets from torrents or websites without paying for them: this is theft. You cannot use stolen assets in your game dev projects. You definitely cannot distribute stolen goods, and especially not on the forum of the company you're (in part) stealing it from. If this is a free asset, and not the one that I think it is, then post a link to the page on the UAS and not the asset itself. Even free assets shouldn't be distributed in this way- the license that makes it "free to use" is between the UAS and the downloader.
     
  8. Sohail1234

    Sohail1234

    Joined:
    Jul 6, 2017
    Posts:
    5
    If you dont want to use then dont do anyone who needs he/she can do :)
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Anyone who engages in piracy is insta-banned. Posting paid assets on a developer forum is one of the least acceptable things you could do.

    No, they cannot.

    --Eric
     
    whileBreak and DonLoquacious like this.
Thread Status:
Not open for further replies.