• 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
1
Question by BDV · Jun 08, 2013 at 08:22 PM · gameobjectsaveload

Save/Load Objects settings(position, rotation ...)

Hi guys,

i have created an editor in unity 3D, you can import a 3D model, walkaround and place scanners around that model. Scanner is a prefab with lot of scripts,lights and other stuff which you can set up in the scanner settings. I want to upgrade my project with a save/load function so i red something about saving in unity (serialization , something with xml...) ... but i dont know which one method is better for me .. or if it isnt better to create my own .. but i need some help and ideas .. My first question is .. if i can save my editor stat to an file so the user can save different configurations .... Second how to save some values of an object .. i have an idea to save all scanner's settings (mostly float values) .. and then during loading just create scanner on a saved position and set the saved values ... but how can i save values of a scanner if i dont know ho many scanners will the user place ??? should i use some struct or something like that?

Thanks for answers :)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by xKroniK13x · Jun 08, 2013 at 09:59 PM

Use Unity Serializer found here. It will save all object positions into a string and you can store that however you want. It has a few examples included. This is my implementation of it, .

Comment
Add comment · 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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Hard question about saving and loading 1 Answer

Save Multiple GameObject with XML 1 Answer

I need to save and load GameObjects. How do I do this? 3 Answers

How to save/load references to components and prefabs 1 Answer

Saving and Loading and assinging to gameobject 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges