Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jamie · Apr 28, 2011 at 01:30 PM · loadinggameobjectssaving

Best way to save the postition of 800+ GameObjects?

Hey peoples.

Basically the title says it all, what would be the best way to save the position of everything in the game world? I currently have the player position and stats saving and loading but I don't know how to approche the gameobjects.

Cheers.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Joshua · Apr 28, 2011 at 01:39 PM 1
Share

How would you identify these objects? Do they have something in common? The same tag or parent would work, but I'd need to know before giving an useless answer :)

avatar image jamie · Apr 28, 2011 at 08:50 PM 0
Share

They are in groups of tags, i have aranged those groups of tags into parents. So all the ones with the same tags now have the same parent.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Craze · Apr 28, 2011 at 03:09 PM

There are multiple ways to approach an issue like this.

A) Do it the super easy way, save it ALL as a single prefab and create it when you need it. This however has its downsides and it is going to be the same every single time.

B) Another method is to save your positions into a set of 2d arrays, which can be complex, but potentially useful.

C) (A method I am using right now) You can generate grid patterns by using a set of for loops that create objects with a certain distance between rows and columns. This method however is only useful for creating grids.

D) A method that is a mix of A) and B), which is to save the entire environment as a collection of organized prefabs and then use code to spawn them as you need them.

These options are how I would deal with such challenges, but undoubtedly there are smarter ways people have devised.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Craze · Apr 28, 2011 at 03:23 PM 1
Share

D) Is the most logical usually, because you can cut down on the massive lag caused by spawning a huge area of objects. $$anonymous$$aking 800+ objects all one prefab will generate a massive amount of lag upon creating it(Hence it's downsides).

avatar image jamie · Apr 28, 2011 at 08:17 PM 0
Share

Thanks, D is a great option.

avatar image zmar0519 · Apr 29, 2011 at 10:21 AM 0
Share

Good job writing a will thought out and correct answer. +1!!!

avatar image Craze · May 04, 2011 at 06:50 PM 0
Share

Just happy to help :D

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Save data from one scene to another? 0 Answers

Serializing a graph 2 Answers

Problem about reading and writing from text files 1 Answer

Retrieving basic Strings and Ints from XML Files (JS) 0 Answers

Does GetInstanceID ever change on an object? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges