If i run a scene normally in unity 3D it looks nice, but if i switch to it from another scene the camera became blocked and crashed without giving me any error!! Am i missing something? I am working with unity pro 4.5.0 and Nyartoolkit .
Here are 2 screenshot of my two scenes:
the first screenshot is my second scene and the second one is the hierarchy of my first scene !!??
It's the same problem when switching from the first scene to the second scene or going back from the second scene to my first one. In all cases the camera became black as it is clear in first screenshot .
Related
I'm trying to make an FPS game using unity, but I've come across a problem. When I load my main scene after pressing "RESTART", it somehow causes my game to change appearance. But when I start the game from the main scene, it looks perfectly fine.. I've tried disabling Post Processing but I believe that's not what's causing the issue, I've provided some pictures of what happens when I load the main scene through the GameOver scene and when I load it through the MainScene.
Scene loaded through the press of a button ------Main Scene (what it's supposed to look like)
Your help is much apreciated
Ok, so after quite a while of messing around with the settings I FINALLY figured it out. To get rid of uneven lighting between the scenes all you have to do is go to Window>Rendering>Lighting>Environment> (make sure "Auto Generate" is UNCHECKED) and click Generate lighting!!!
I have a simple Unity scene (Scene-1) and a scene with ARKit.
I can switch between the scenes using SceneManager.LoadScene("sceneName")
When I switch from Scene-1 to ARKit scene everything is fine.
But if after that I switch back to Scene-1 and once again to ARKit scene - the ARKit scene doesn't work, looks like it stuck. I see a frozen image from the camera, though all buttons work.
Why is it happening, and is there any way to load a scene with ARKit more than ones?
Whenever I create a new project in Unity 5 I see this
and I'm not familiar with this scene. The problem is I don't know how to change this scene to this one.
Any solution ?
This means that Unity is in 2D Mode. Click the 2D Button that is next to the Game tab in Unity. That will switch you back to 3D Mode. It is circled in red in the picture below.
And whenever you are creating a new project, make sure to select 3D not 2D and stuff like this won't happen. If it does, click on the 2D button circle in the first image, save scene and exit. That should now be fixed.
I am creating a 3D game in Unity.
I want to have an image slowly fill up to make the cooldown of a skill visible for the player. Fortunately the UI image can do exactly that.
Unfortunately the UI image causes the engine to crash when I click play. The generic message "Unity stopped working" shows up too.
I created it by going to GameObject>UI>Image. Then I filled in the Sprite and the main camera. I did nothing else.
Removing the Canvas, Image and EventSystem (Which spawn when creating a UI image) fixes the crash.
Am I doing something wrong? I am very new to Unity.
EDIT: It turns out something in my code IS doing something to the image. However, I never in my code specify anything towards the image. I am using GUI elements though. Could that be the problem?
EDIT2: When running the Unity Debugger it gives me the error Couldn't set project path to: C:\Users\[MYNAME]\Documents\CellGame\Assets
I don't know what this means, as everything else is able to load from my assets
EDIT3: That doesn't seem to be the problem at all. What really is the problem is a line I'm calling. I'm going to try to figure out what in that line is causing trouble.
EDIT4: It turned out that there is a problem in my code. When I start my game, for some reason it detects that my player has no health, and goes to the Game Over UI. I had set this to just be the main menu UI, and when it toggles the main menu UI it also reloads the scene. Reloading the scene caused the crash, presumably.
The problem was that my script had a bug, where it would reload the scene as soon as I pressed play. With the UI image in my scene it caused Unity to crash.
I'm not sure why it crashed.
At the moment I've set up a dual camera scene in Unity. I've created an empty game object for my camera's to inherit from and attached some of the first person controller scripts to this empty game object.
When I run the program in the editor, it runs fine. When I build the project, the game crashes and my camera objects fall through the ground. I've never experienced something like this before in Unity. Attached is a copy of my my current fps set up values.
In the picture, you will see that I have turned gravity off (set it to 0), yet it still falls down when I run the built program.
Has anyone ever come across something like this before? I've spent all day trying to fix this, but I'm getting no where.
I experienced such an issue when my parent object (I usually use capsules to "carry" the camera as the players head like 1.70m above the ground) is set to low ... what happens if you move your camera-guy together with the game object one meter upwards? (so that he falls down a bit against the surface when you start).
Maybe there is a difference in some relations between editor-build and release-build.
Or, in case this isn't the solution, check the spatial positions of your involved objects again. Falling through a terrain is often produced by misplaced reference objects. (I sometimes hung a carrier object under a camera instead of hanging the camera under a carrier object.)
As you say that it works in the editor-build i assume that you have activated collision for the relevant objects.