I am in the process of moving over to unity from MonoGame / XNA. The one thing that has me baffled however is locations on the screen. I am sure many new people to Unity run into this problem as well. To be more specific I have an application that allows for dynamic content to be loaded and displayed on the screen. With XNA the scope was broad (or so it seemed), as if I wanted an object to be placed at let us say X 1022 Y 480 I would just say this:
// shorthand code
object.position.x = 1022
object.position.y = 480
However, in unity when I do that the object I noticed goes off the screen to an very (and I mean very) far away position not in view of the camera whatsoever. I am pretty sure my major hang up here is the camera. I have read several documents pertaining to the camera and how it works; but for some reason it is not clicking.
I am currently using an Orthographic type camera with a Size of 20, Clipping panes (N0.3 F1000) Rect (X0 Y0 W1 H1) as this allows me to display a 1920x1080 background image with a Z of > 10 and have it cover the entire camera space.
I guess what I am saying in short is in the theme files (my application uses theme files that loads custom images (sprites) and effects) how do i lets say position an object in the following manner:
Object 1: 10 pixels from bottom left and 10 pixels from bottom
Object 2: 20 pixels from top right and 100 pixels from top
The above are generic lines of code but they plainly state what I am trying to achieve here with this new system. I am sure the answer is as clear as day and staring me right in the face but for reasons unknown it has eluded me. Any help on the topic would be greatly appreciated and welcomed whole heatedly.
Good day.