- Home /
Objects sometimes disappearing at varying distances in scene view, game view is fine
Hi, thanks for any help. I see a lot of people that seem to have a similar sounding problem caused by issues with clipping planes and visible layers, but this is not the same problem I am having.
In game mode everything is fine. Usually in scene view I can zoom right up to my objects, but now and then Unity causes them to start disappearing when I get within a certain distance. What the distance is seems to vary. Sometimes, but not always, when I restart Unity it fixes the issue. I've tried playing with the visible layers and clipping planes to verify that they are not a part of the issue. At the moment I am actually able to get closer to my objects in game view than scene view. thoughts?
Some questions:
Are they meshes? skinned meshes? sprites? Are you using layers and rendering them through different cameras? Do these objects have immense or tiny scales? Are you using vanilla Unity or do you have plugins and the like that contain editor scripts that might modify the game view? Are those objects hidden in some way and at the start of the game and then you activate/show them through code?
There are many objects, some skinned meshes, some meshes without skins and many of them also have sprites. I am using layers, but they are all rendering through the same camera. they are neither immense, nor tiny, almost everything is at or around a scale of 1 for all three axes. No plugins. they are not hidden, but many objects are instantiated at the start. I am having the camera issue with objects that are there and shown at the start as well as the instantiated ones. All objects appear as they are supposed to in the game mode and are clearly present in scene mode I just can't get close to them.
I had the same issue:
AS you can see in the images, a little differents on alttitude of Scene camera (not the object camera, i mean the scene view) makes some of the planes disappear and reappear in other alttitudes. This happens before press play, i mean, there are no scripts running...)
Is not like "at lower than X alttitude, it disapears.. no, its like from 150 to 100 disappear, but higger or lower fromt hat you can see them.
AS you see in the 3rd image, they are over the black background, so they are not behind, they are not rotated...
@$$anonymous$$AcDx :
Are they meshes? skinned meshes? sprites? They are 3D planes with Spripes/defaut material
Are you using layers and rendering them through different cameras? No, they are just one over other (3rd image)
Do these objects have immense or tiny scales? 3x1x90
Are you using vanilla Unity or do you have plugins and the like that contain editor scripts that might modify the game view? No, its just Unity 2018 vanilla
Are those objects hidden in some way and at the start of the game and then you activate/show them through code? No, and they are all static "Everything"
Answer by Oorlfe · Jan 22, 2019 at 10:48 PM
I figured out how to fix it, but not all of the cause. In scene mode, if I double click on certain objects in the hierarchy the view shoots out very far and when I zoom back in I get the problem. Apparently this has to do with being focused on the object that I double clicked on. To fix it I just need to double click on another object in the hierarchy that it will properly focus on. The object I discovered this much of the cause of the problem on was a UI Image object. in canvas, out of canvas doesn't seem to make a difference and not all UI Image objects are having the issue. So I do not known what makes certain objects have cause this problem.
Just found that switching off and on the perspective option in the scene view camera also seems to get rid of the problem though I don't know if it will only work sporadically like turning Unity on and off. So, at present its working correctly again, but it would be nice to known what the issue actually is.
HEy @Oorlfe
It does not work for me. If i swap view mode to orthografic I get the same problem.
Sorry, that's as far as I've gotten with the problem. Good luck.