scene added to scene

Ok lets say we have two people working on the actual virtual world. Is it possible to combine both of there worlds together in the same scene or can they only be separate scenes?

3 Answers

3

I think you mean at design time, not run time? If so we do this a lot because of the nature of the Unity scene. It's not really possible to have two people working on a scene and then merge them at some point in the future (because they are a proprietary format). So we have anchor scenes and then load in parts of other predefined parts of the 'virtual world' with LoadLevelAdditive at runtime.

The caveat to this is that you must come up with a strategy for keeping up with the additive parts that are loaded on top of the anchor so that when they are no longer used you can dispose of the resources. Unity does not provide a way to do this. When a scene is additively loaded, the incoming scene is just dumped onto the scene graph intact. An easy and effective way is just to create the additive scenes under a GameObject with the scene name and delete the object when the scene is not needed anymore... this is about as close as you will get to an unload operation.

Edit: Another caveat is that the presence of an async and regular version of this call gave me the impression at first that after the regular version completed that you were ready to go with the imported scene graph. This is not the case because of the lifecycle of Unity objects. I think it's usually safer to use the async version and use a coroutine or callback mechanism to halt your operations until it's done completely. I tried to immediately operate on objects that were part of the additive scene and found I could not reliably using the regular version.

If you are planning on having a networked gameplay where 2 or more people interact with each other in one particular scene, then it needs to be a single scene.

If for some reason you want them to be separate ( no multiplayer) then they can be different scenes.

This is a very specific question that, though I am sure some can answer, most cannot. You will likely get an answer faster by finding a Chinese VPN and testing this yourself: Your your traffic through China and ping 8.8.8.8 If you do do this, come back and let us know what you find. Its a great question.

There are certain multiple scene topologies that can work with multiplayer code: very carefully.

~

I found this editor extension is really helpful when different individuals are working on different scenes:

http://docs.unity3d.com/Documentation/ScriptReference/EditorApplication.OpenSceneAdditive.html

It is a “Simple script that lets you load the contents of a selected scene to your current scene.”

Hey! I decided to get rid of the internet-checker as I didn't need it. My game contains links to my social media profiles (Facebook, twitter and instagram). It also sends feedback directly behind the scenes to a google form for me to collect and see. I was wondering how this would work in china? Is it okay to leave it available for people in mainland china. What happens if they click it? Can I get in trouble for using a google service or something? Thanks!