Skybox Renders in Unity but anything else doesn't - c#

sorry if the solution is quite obvious but I'm still a learning student.
I'm teaching myself on the side by making a 2D game and was working with Unity but got stuck when I noticed the Game screen and the Camera Preview display the game properly, but the moment I run it, it only shows the Skybox and nothing else in front of that... The Main Camera is behind the Background so I'm a lil confused why it only renders the Skybox.. any advice?
I put some pics below as an example of the settings (yes the camera follows the player and some usages are a bit outdated)

After another look, and close inspection, I would like to point you at where your objects are actually located, your max and min for your camera is: -4 and 0.66 your BG and your camera are starting at -100 something. so when the game starts your camera is moving to -4 from -110 that is why you cannot see them.

Related

Nothing showing in playmode

My script is running fine and had been showing the game up in play mode (but not in scene view) up until I finished the script and now it has disappeared and I can't seem to find it in either.
I made sure I was in orthographic view, tried messing with the near and far values of the clipping planes in the main camera and made sure all assets in the scene including the gameobject housing the script were positioned at 0 on all axis. I can't find it at all anymore, aside from when pressing pause in play mode but then I can't test the interactions.
This is what I see when I enter play mode
This is what I see when I hit pause
it's supposed to be shuffled at the beginning so that part seems right as it is a different order every time I try this
Move the camera back 10 units on the z. Cameras have a view frustum, where elements outside it won't render. This is what is happening here. With the near plane set to 0.3, you need to move the camera away from an object by 0.3 units. The default z value is -10 on the camera.
https://docs.unity3d.com/ScriptReference/Camera-nearClipPlane.html

Character stuck on a tile unity3d

I have no idea what to say, but I have this image which shows how the character is stuck, the character gets stuck when I try to jump couple times, character is not falling.
if I jump 1 more time, the character jumps and drops to the ground
Here is movement code (didn't want to paste it here cuz it is kind of big)
oh and btw this is 2.5d game, 2d in a 3d engine
Maybe you are stuck on a subpixel?
Check the colliders: Window->Analysis->Physics Debugger.
Check the x-coordinates of the blocks in each "tower".
Change from boxcollider to spherecollider (so you slip off of small edges?)
What about the "GroundCheck Transform"? I don't see why it's a separate transform, is it a child of the player?

Unity Animation: Can I Skip/Forward the played animation by touch?

Halo guys, I'm literally new to C# on Unity. Can I ask some scripts if I may to you all. The case is somethings like this: I have an animation that played some sprites on a scene. I want to know if I can skip / forward the animation by touch using C# scripts placed on Empty Game Object. So the animation can move forward for 1 second / 2 seconds if the user touch the screen, so the animation more faster done playing or the user doesn't need to wait the animation that played to be finish.
I just think I may build that function with for statement and placed on void update. Please correct me if I'm wrong, and if I may put some code on you'r thought. Many thanks and cheers :).

Particles not appearing in Unity

I have made a smoke particle effect that I instantiate everytime the player shoots, its working but can not be seen with the background. If I delete the background it's visible, I've tried changing the ordering layer, creating a new layer and putting it above the default, but no matter what it's still below the background. Any ideas?
Assuming you are developping a 2D game, you can use the z axis to set the distance of the elements to the camera (what will be the equivalent to the order of render)
Usually in a 2D game you will have the main camera at -10 in the z axis. So moving in the inspector the backgroun to, lets say z=5 or z=10, and keeping in you particle system in z=0 should solve your problem.
Try this easy trick and let me know if you are still facing problems.
You can check the second half of this video for a better understanding
Also, if you are making a 3D game you can go to the material of the particles and make sure that render face is set to both. I just had that problem and it was annoying me. but that fixed it.

Keeping the scene inside the screen - Unity

beginner-ish Unity developer here.
I have made a simple Unity game and I have a problem when building it. I cant get the game to stretch to fit the size of the game window when built outside of Unity.
In the Unity scene when I am working, I set the camera to encompass a specific area of the scene that has my background objects and level and everything inside the camera view. The problem is when I build the game out of Unity the screen is a different size depending on the resolution setting, and the game objects(backgrounds, etc) doesnt stretch to fit anymore. So I either get the game going on in the center of the screen with the blue Unity space all around it where there is nothing, or the screen is too small and parts of the game are cut out(missle count, score) at the edges of the game.
I know there is a way to set this stuff up, but I am not sure where to start. Can anyone give me some info or point me in the right direction?
Thanks!
See link.
http://docs.unity3d.com/Manual/class-PlayerSettingsStandalone.html
Also when designing GUIs see example
GUI.Button (new Rect((Screen.width / 2) - 510, (Screen.height / 2) + 150, 200, 30)
http://answers.unity3d.com/questions/307330/gui-scale-guis-according-to-resolution.html

Categories