Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 MazeTard · Apr 21, 2016 at 09:16 AM · bugscenesversion-controlsave scenesave-to-file

How can i make the scene in my build the same as in my Editor?

Due to some version control issues, i now have a perfectly good build, with all my scenes and scripts in order. However, when i want to work on my scene in the Editor, it's weeks behind. Is there a way to say i want the scene in my build settings, to be the one in my folder, so i can keep on editting it?

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 MazeTard · Apr 21, 2016 at 10:49 AM 0
Share

This has been solved. There WAS in fact 2 versions of the same scene. One was placed in a prefab folder, the other was in a folder named Scenes. How it happened, i do not know, but i tried copying all data from the working scene to a new scene. Once i was done, i added it to the Build Settings, and saw their paths was different, thats how i found out

avatar image MazeTard · Apr 21, 2016 at 11:49 AM 0
Share

I should probably add, that i did manage to get the proper scene in the editor a few hours ago. I assumed everything was all good from there, and pushed to version control and made a local backup.

Suddenly it was back to the wrong scene again, and i dont know if it was after a Unity restart, a build or something else.

Was that just luck or some kind of randomness?? Are you sure theres no way around it??

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Immanuel-Scholz · Apr 21, 2016 at 09:36 AM

This is not easy possible. When the game is built, the scenes are processed and changed and there is no unity-supported way of restoring a .unity file from distributed .asset files.

The (most probably) easiest way is to just bite the bullet and recreate the scene.

If your back is really against a wall and there is a shotgun pointing at you, then there might be a rather complicated way of getting some attributes extracted and re-imported. Basically, you can overwrite DLL's in a built project, so what you could do is to write some script code that gets always executed when the scene loads, (e.g. by hooking into some Awake() of an object in the scene). Then iterate all own gameObjects/settings and write the information you want to some text file.

Finally, write some other editor tooling that reads in the text file and applies it to the scene in the editor.

If you are not firm in scripting and editor scripting, I strongly recommend you just recreate the scene from hand. :(

Comment
Add comment · Show 1 · 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 MazeTard · Apr 21, 2016 at 11:49 AM 0
Share

Holy cow! That's terrible, i'm only a few days from deadline: I should point out, that like an hour ago, i managed to get the correct scene in the editor, and i assumed all was well. But it went back to the wrong scene. I do not know if it was after a Unity restart, test build or whatever. Was that just luck, or maybe randomness?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

What can i do when my built Scene differs from my scene in the Editor? 0 Answers

Unity won't save new scenes 0 Answers

Easy Save Loading 0 Answers

switching scene, first one stops to work properly 1 Answer

How to save current scene of the program and upload the scene to web? 1 Answer


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