Unity 5.5 layers - unity3d

I have a question regarding panels/layers in Unity.
My problem is that sprite which i set to be in the lowest layer, overlaps other panels which are set to be in higher levels. Is there any way to fix it? I tried almost everything and still my sprite is always overlaping layers which are above it.
in the next picture you can see settings of the layers.
I would really appreciate a help. Thanks a lot

You Can just re-order them in the Hierarchy window. top to bottom. Bottom most is above everything else.
There are other posts on this subject you can check. But you need to use transform SetAsFirstSibling, SetAsLastSibling, SetSiblingIndex, GetSiblingIndex
Please take a look at this

Related

UNITY: Everything looks Low Resolution. Even SVG vectors

I'm new to Unity so Hopefully this is an easy fix.
So everything looks super low res for me. I wish my images looked high res.
Even SVG looks low res even though they're vector nodes, I don't get that at all but I assume Unity doesn't play with svg yet? the black outline graphic is SVG, the rest are PNG with alpha.
Take a peek at my three different windows. Let me know your suggestions (remember I don't know anything so the easiest thing can been overlooked)
There is a "Scale" slider on top of the game view. Right now it is set to 2.8x. When you do that Unity just zooms in but it doesn't set the the resolution or actually change anything at all. It's like moving the screen really close to your face :D Nothing else besides that particulat window is affected by this setting. So my advice would be to always keep it at 1. Unless you want to see something specific at the screen of course

How to 9-slice a sprite while keeping the center not scaled?

I wonder is there any way to slice this sprite(dialog pop up thing) that could keep the bottom center (the upside-down triangle) not scaled? I'm using nGUI if it matters.
Nope
Sorry, but that's how 9-slice scaling works. You would need 25 slice scaling to do what you're looking for and that's overkill for most things, so I've never seen an implementation.
What to do instead...
Break up your sprite into two pieces: the 9-slice portion and the "notch" portion. Then just position the notch to be in the right place.
I haven't used nGUI (only iGUI and the Unity native--both old and new) so I'm not sure on the precise nature of how nGUI will let you do that, but you'd still need two sprites, one of which is scaled and the other one which isn't, positioned either manually or through parent-child relative relationship. If your dialog is always the same width, it'll be pretty straight forward. If not, it might be more challenging.
A few other things:
You'll probably want the notch sprite and the bubble sprite to the same native image size, but its not necessary (might make things easier, might not).
The notch will want to have some "overbleed" so that when the two stack the underlying rendering code doesn't go all squinty eyed and go "there's a gap here..." and draw through in some cases.
Depending on the bubble portion's drawn edge, you might want the notch to be in front or behind. In your precise case, I don't think it'll make a difference. It's a little hard to tell due to the colors, but when I did a selectable tab (which is built similarly), the tab sits on top of the container window so that the shaded edge flows nicely. The unselected version then has no overbleed so it looks like it sits "behind" (accurate pixel placement--2D game at a fixed size--insures that no "gap" is rendered).
It's a little tedious but pretty straightforward to implement this for UI images. I recently did it in order to make a slice stretch the left/right borders of a 9-slice instead of the center.
The trick is to subclass Image and override OnPopulateMesh, where you do the calculations you need and set positions/uvs to whatever you require.
Here's a helpful how-to article: https://www.hallgrimgames.com/blog/2018/11/25/custom-unity-ui-meshes
Things for a non-UI sprite will be harder. I think you'll have to create all your geometry in a script, and the calculations might be a little complicated because you're using an atlas.

Roads are looking blurry in Unity

I am trying to make some real looking roads in my game,but the problem is ,when i am using roads so they are little bit blurry at distance and look like a real one.Can any one please guide me to solve this.I have uploaded my pic here
Is there possible solution for this?
Yes, it is a common problem, for textures' rendering at a certain distance/angle. You should enhance the aniso level, in order to apply an anisotropic filtering on the blurry texture (you can also change the aniso level from the texture's component, as in the picture below).
If the road is created via a Terrain component (which I doubt, since you already have a sandy terrain at the bottom), you should change the basemap distance.
Check also Quality settings, it might have Anisotropic textures disabled.

Rendering a 3D object from four different angles

I am working on a project where I have to render 4 different sides of a 3D object at the same time on the screen. The output should have 4 different camera outputs rendering the front side, left side, right side and back side of the 3d object.
I found that a gaming engine like Unity may help to do something like this. However, I have just started using Unity and can't figure out how to do it.
Here is the link for some examples. This is how I want the output to look like
Well first of all, welcome to Stackoverflow. And you are right, Unity is an excellent IDE to achieve what you described.
As stated in the FAQ and here, I'm going to give you an answer I deem fitting to your question. I can post the code here in about 30 minutes which does exactly what you asked for, but then we'd miss the point of learning to program and posting at StackOverflow in general. I'll show you the way on how to start on this project, but then you'll have to try yourself. If you have any troubles after trying some more, we can help you with specific problems, provided you have researched some before and show us what you tried.
As to your question, it's relative easy to do so. First create your object in the scene, then drag and place four different Camera-objects in the screen. Using the Camera's Normalized View Port Rect (Four values that indicate where on the screen this camera view will be drawn, in Screen Coordinates (values 0-1)), you can then split up the view to show the feed of each Camera.
This ofcourse happens in a script. You can read here about Scripting in Unity. Even if you are an expert in programming, that link is worth a read when you are new to Unity.
Good luck.

Constraints issue in Xcode

I'm having some issues with the constraints in my app. Here is how it looks on the iPhone 4 (that's how i want it to look, and how i usually setup my interface, is this the proper approach or not?)
Now, when i switch to the iPhone 5 screen it looks like this
and as you can see, the blue dots (which is UIButtons) are not placed where i want them to be. I made my constraints rely solely on the right side of the view (since that is the one re-sizing, i found that in order for you'r views to align themselves accordingly, it doesn't help to align them to the left side). I don't really know how to fix this. I am finding this new iPhone screen to be a real pain in the arse. Any good advice on how to work with this new screen without a lot of headache would be appreciated :)
Thanks on advance
It looks to me like the are still the same distance from the right side of your view, as you said you set them to be, while the background has stretched to fit the new size. I suspect it's actually the background that isn't doing what you want it to do (keep the same aspect ratio and show more stuff on the left), or try keeping the buttons relating to left and right to stay aligned with the stretched background image.