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 Knightraven8 · Sep 18, 2012 at 10:26 AM · multiplescenesrunningonceat

Is it possible to have multiple scenes saved in memory?

I'm making a turn based game where players shoot cannonballs at each others castle. When the castles are hit, the bricks fly and fall using the built in physics engine. I want to make it so that player 1 shoots, then it switches sides so that player 2 shoots, then back again.

I currently have 2 scenes, one for each player, and what I wanted to do was be able to switch between them and keep the positions of all the bricks in between scene changes. Is there any way to do this easily? Or would it be better to just stick both castles on the same scene and switch to a new camera (which I was hoping to not have to do simply because of resource issues. Too many bricks in the scene cause lag, so with both castles in the same scene, it makes the game run too slowly).

I'm currently using Application.LoadLevel to switch between the two, but obviously this causes the scenes (and the castles) to reset each time it is the next player's turn. Is it possible to just switch back and forth between the two while saving the states of everything in the scenes during the switch?

Comment
Add comment · Show 1
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 liszto · Sep 18, 2012 at 11:47 AM 0
Share

Why don't use only one scene ? It's a network game ? You can although use this : http://docs.unity3d.com/Documentation/ScriptReference/Object.DontDestroyOnLoad.html

But just say this like that is really complicated for us to imagine what you really wanna do with your scene / game. If it's networked you just need one scene and maybe for all others mode too.

Why would you do 2 scenes ?

You can look this link too : http://whydoidoit.com/unity-serializer-v0-2/

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by whydoidoit · Sep 18, 2012 at 11:59 AM

One idea - if you make both castles live beneath a different game object you could SetActiveRecursively to turn off one of the castles while the other is being simulated. If your cameras are also beneath the same object then they should also switch on and off correctly.

Comment
Add comment · Show 2 · 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 liszto · Sep 18, 2012 at 12:08 PM 0
Share

I approved ;)

avatar image Knightraven8 · Sep 19, 2012 at 05:49 AM 0
Share

Thanks I'll have to try that!

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

13 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

Related Questions

Instantiate 3 guiTextures at the same 1 Answer

How to instantiate everything inside an Array? 1 Answer

Rotating Multiple Objects at once (OnCollision) 1 Answer

Multiple independent scenes 0 Answers

Multiple Animations at once? 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