anyone know why?
Hi Dan, welcome to community
A screenshot could be really useful here, perhaps on in Scene View with one of the UI objects selected in the Hierarchy so that itâs details are displayed in the Inspector.
It would only be a guess at the moment, but I would perhaps lean towards the transform position. If it was something like that, double-clicking on the UI object in the Hierarchy would re-focus the camera in Scene View to the object, so you would be able to tell if it was way out from the main play space. If that isnât the case, then you could check other things like the Z axis value in the Inspector, e.g. is it behind something else. Sorting order can also be relevant, as can the order within the Hierarchy, but probably best to start with a screenshot and lets see if thereâs something more easy to spot first
Thank you
the course is great btw!!
it doesnât seem to be the z axis, I tried resorting the hierarchy but doesnât seem to do anything. il send a screen shot.
Hi Dan,
Quite possibly one of these most distracting set of screenshots Iâve ever seen in my life! Often best to full screen the Unity editor window for these, can also conceal your personal stuff then
Ok, so thereâs some odd things going on in this scene and itâs hard to tell from the screenshots only, but typically in a new scene the camera will be centred on 0, 0, 0. You have the ball GameObject set at 130, 145, 0 - I wouldnât expect to see that in the playspace with the default camera view, it also has a massive scale doesnât it? 23x! The block is also set on the X and Y in the hundreds, rather than anywhere near 0, so at the moment, if I had to guess, Iâd say you have these game objects just outside of the camera view port.
Try this,
Select the ball and set its transform to 0, 1, 0. Then select the block and set itâs transform to 0, 0, 0.
What do you have the pixels per unit set to for the ball sprite? That seems a very large scale to be applying.
Hi Rob
It seems I am having the same issue. The object appears on the scene panel but not on the game panel. When I run the game everything works in the scene panel but not on the game panel.
I have attached screen shots of the ball, block, background image, camera, and canvas.
Also I am not sure whats happening with the button âNext levelâ . It is oversized in the scene panel but somehow in the game panel it appears reasonably sized. Does this have anything to do with anchoring???
(I attached a screen shot of the button below too.
Id appreciate your help
BTW thanks for the fun course. I havenât had any issues so far.
Ball
Block
Camera
Canvas
Background
Next Level Button below
Iâm having trouble seeing the screenshots on my phone, but if UI elements are not showing in the scene view, its likely that the UI layer (under Layers near the top right, above the inspector) is toggled to not visible.
As far as the scene view and game view looking different, you can probably click on your Main Camera, then go up to Edit at the top (or GameObject) and click Align To Selected.
This should re-orient your scene view to match the cameraâs current game view.
BigO, try setting your camera position to 0,0,-10.
Do something similiar to the above. Click on your Main Camera, go to Edit at the top, and click on âAlign With Viewâ. This will move your camera so that it sees what you see in the scene view.
Tried this too. Didnt really solve the issue. Im attaching the screenshots showing the difference I am talking about more clearly.
BigO:
Okay, yeah those look perfectly normal.
One of the oddities about Unityâs UI system is that even though it even though it is portrayed in World Space, it doesnât really occupy the same space as the rest of your world. Your world objects will often be at a certain scale, while your canvas is much, much larger.
This is because the size of your canvas is like '800x600 or something like that. When shown in World Space, thatâs huge! Your background is only like 16 units wide while the canvas is 800 units wide.
This is okay and perfectly normal.
It doesnât matter because the canvas will be scaled to your screen view when you actually play the game.
Youâll probably want to use the Layers menu to hide the UI when you are not working on it.
(To easily look at your UI, click on the canvas and press âfâ (or I think double clicking works too). Then to work with your normal objects, click on an object and press âfâ or double click.)
Hello Dan
I am not shure if you have the solution?
If not, try to set your Camera in Transform with Z = -5.
You can control the effect in 3d (click â2Dâ in the scene).
I hope this helps.
Hello,
I had the same issue and what seemed to fix it is in the âMain Cameraâ -> âClipping Planesâ -> âNear = 0â. Mine was 0.3, and that seemed to be causing the issue.
Best Regards,
Ivan
I was having a similar issue where I could see my game objects in the Scene window, but not the game window. I looked at the Camera object transform, and the Z axis was set to â0â. When I set it to â-10â like Rick had on his, things reappeared.
Hope that helps!
- Rob
This worked for me.
Thank you.
I am having a problem importing a sprite. The image is 1080, but is importing as a really small image in scene. On top of that problem, when I press play, the image is not even there. Please help.
You are looking at your canvas, not your camera. It´s rather unexplained at this part (not sure if he goes deeper into it later on) but if you double click on your camera it will show where your camera is set up.
It will still be a pain sometimes to get things into your camera view sometimes.
Thank you! Had this Problem too but now it works fine!
This fixed my problem⌠somehow! Thanks
setting Z to -5 also helped me but i want to learn why it worked
Hoping someone can clarify this