2 Questions about Scenes

First: Is there a way to show the main camera view from one scene inside a different scene (the current active scene specifically)? Like in a pop-up window, or a monitor on a desk, or something similar.

Second: Can you seam two scenes together? I would like to make it so that if the player approaches an invisible boundary, the next scenes content is visible as if it was in the same scene. Once the player crosses that boundary, they are still able to see the objects in the previous scene until they are visually out of range.

As usual, just a yes or no on if its possible and a nudge in the right direction to get me started is all I really need (link to documentation, or a forum post I missed). A full or partial implementation is of course welcome as well, as long as it comes with some kind of explanation. I like to know how the code works. :slight_smile:

You can load one scene into another scene and just make sure the level and assets are in different locations…

The second scene would need to be somewhere in the same level, which you can load additively (Free) so that you keep your current level. Then use a Render Texture (Pro) or simply play around with Camera depths (Free).

Again, load the level additively (Free) or additive async (Pro) Destroy your old level when it is far enough away.

Thanks, It looks like I’m going to have to go pro to get my pop-up windows and desk monitors, but that will do EXACTLY what I wanted for the first question.

If I understood the documentation correctly, none of that really does what I’m looking for in the second question. I’ll explain it better if I can.

The reason I am trying to seam 2 (or more) scenes together is to help fix some floating point issues. Some of the objects are so large and far from each other that the smallest objects freak out. My thought was that if I could split up the scene into smaller ones, the distances wouldn’t be as vast, and it would indirectly let me scale down a lot of objects. so, the goal is this, my purpose is 3d, but ill use 2d to keep it simple:

Say you have 1 scene, invisibly bounded to 20,000x10.000 (-10,000 to 10,000 x -5000 to 5000)
I want to divide that scene into smaller scenes, 10,000x10,000 ( -5,000 to 5,000 x -5,000 to 5,000) then allow the player to see what is in the 5,000 x whatever side of the left scene while they are near -5,000 of the right scene. Then once they cross over, it works the other way, as I previously described.

Doing this allows you to build larger continuous levels without going to insane numbers in transform.position. That is, if unity supports doing this somehow. What you provided seemed like it would overlay one scene on top of the other (with respect to origin), which wont really help me get the seaming effect I am looking for. If I misread that, please correct me.

On the up side, the additive async will help me put a feature back in that I had previously decided to take out because it was too complex for the benefit. So yea, thanks for that! :slight_smile:

EDIT: I am not trying to say you are wrong, or to seem ungrateful (after re-reading my post, it kind of seems like I’m doing both). In fact, I am very thankful for you help and I’m just saying either you misunderstood what I was asking, or I am misunderstanding the documentation you linked, not sure which (hopefully you can say, with my better explanation).

Bump! I’m still looking for an answer to the second question, as stated in my last post. As well, I am still having performance issues with a different approach to the same problem.

An answer to either approach will help me with both (wont need the other if I have one working already).

The other post is here, didnt want to bump 2 topic at the same time, especially when they are both trying to resolve the same problem:
http://forum.unity3d.com/threads/167908-Scaling-by-distance-performance-problem

Thanks in advance for any help you can provide with either approach. If you have an opinion, I would also like to know which approach you think will be more effective (assuming both are possible).

Try Application.LoadLevelAdditiveAsync.

That was suggested already. I looked at the documentation and It seems like it doesn’t add another scene to the “edge” of the current scene. Instead, it merges the 2 scenes. For instance, if an object in one scene is at (1,1,1) and a different object is at (1,1,1) in the other scene, the objects would be in the same location in the combined scene. I would like the objects in both scenes to maintain their independent coordinate systems, as explained in the post starting with “Thanks, It looks like I’m going to have to go pro to get my pop-up windows and desk monitors, but that will do EXACTLY what I wanted for the first question.” in the 4th ‘paragraph’.

Again, my goal is to divide a MASSIVE scene into smaller scenes and allow the player to seamlessly travel between them without losing visibilty or interactivity with the scene the player just left. As well the player needs to be able to see and interact with objects in the adjacent scene, if those objects are in visual and interactivity range.

I was thinking of a custom layered coordinate system. one set of coordinates for the locations of the scenes, and another set of coordinates for the transforms within the scenes. But that cant be done until I figure out how to merge scenes edge to edge rather than origin on origin.

I’ve been working on the project where we have been using a single scene, but have been loading asset bundles dynamically and asynchronously, instantiating them at various places (we’ve been using Unity Pro for this feature). These assets contained all sorts of objects, including floor parts to walk on. The only trick is to place it to the right position, so the newly loaded floor part snaps into place.

AssetBundle.LoadAsync

I think your misunderstanding my reasoning of why I need to divide the scene. The problem isn’t that there is too much to load at once during the initial load. The problem is that the objects are far apart, leading to floating point issues. My idea is that by dividing the large scene into smaller ones, the transform numbers will stay smaller on the outer edges of the overall “level”, since the transform positions would be relative to the smaller scenes’ origin, rather than the “level’s” origin.

If I used either method you listed so far, it would still leave me with the same problem, since the objects position would still be based on the origin of the current scene.

Am I making sense at all? I hope my explanations are understandable. I’ll try to draw up a visual representation of what I’m trying to accomplish if all this isn’t making sense

I see. You are dealing with a huge world here.

I’m out of answers… Perhaps you should ask directly one of Unity gurus (via Twitter etc). If this is a real problem, I believe they are aware of it, and could offer you a solution.

Yep, the huge world is the problem. I appreciate your help. I have found other solutions for the problem, such as moving the world around the player, rather than moving the player in the world, but all of those kinds of solutions cause problems when you start to look at a multi-player game.

What about the scaling solution I tried (the link is a couple posts above)? Do you have any suggestions for improving performance there? If I can successfully make objects appear bigger as you get closer, at runtime and on the fly, without major performance bogdowns, I wont need such a huge world.

I’m not stuck to these two concepts, they are just the only ones I have been able to come up with that may work in a multi-player environment. If anyone has any suggestions for a different approach, I’m all ears, so to speak.

As I said, it’s better to ask UT guys directly (no need to feel ashamed). I’m really just the GUI guy… :slight_smile: Answered to your thread because I had the similar problem to solve and offered you the solution I came about back then… :slight_smile: