Handling different resolutions?

Hi guys, so I just made a simple top-down shooter to get used to unity. I found the co ordinates where the camera ends, and spawned monsters from there, and had a life bar on the top left…etc

Now when I play it on android suddenly I see a whole mess because the view is not the same from pc resolution to the phone resolution (duh).

So is there a way that I can reference directly the camera co-ordinates and instantiate according to where the edges of the camera are? I assume this is how one would handle different screen resolutions…

Thanks, Luke

I posted a response here to solve this horrible problem mobile - How do you handle aspect ratio differences with Unity 2D? - Game Development Stack Exchange

You can do something like this :

private var fScreen_Width : float;
private var fScreen_Height : float;

fScreen_Width = Screen.width;
fScreen_Height = Screen.height;

which will give you your current screen dimensions. You can then use this info to adjust whatever you need to.

Edit: You can than do what tanoshimi says and calculate the ratio from these values and use that as your base for adjustments.