New GameObject position

When clicking GameObject->Create Empty, how do you get it to be positioned some where specific? In photoshop you can paste things in the last place you clicked. Can you do that in Unity?

Via that menu option? Nope, just create it and set its position in the inspector. Otherwise you can always duplicate an existing object and it will be in the exact same place as the original.

Oh, and I’m moving this to Scripting instead of leaving it here in UnityGUI. :slight_smile:

gotcha. but how do i find my current position? Normally, I would see like x,y in PS.

Select the object in question, and look at the top of the inspector. You will have Position, Rotation and Scale values for the object.

Unless you are asking how to get the position of the object through scripting, that is another thing all together, yet equally as easy.

Which question are you asking?

+1 select object, view data like that in the inspector (or set the x,y,z information for example, it’s a get and set Inspector).

im saying how do i get the position of the cursor. For instance, I might be looking at one spot from the top view, create a new empty object, and find that it was placed REALLY far away from where I was looking at. It would be nice to put my cursor in the screen and see where the x and y coords are to be able to move the object there

In 3D coordinates that’s not always well defined. How “deep” into the scene do you want to know the position? At the camera’s near clipping plane? The far clipping plane? Some point in between? In 2D there is the one flat plane, the x-y plane, where over that plane is your mouse, compute position, done. In 3D space that could be any plane at any distance from the current camera view and at different angles, so it’s tough information to provide in a useful way generically. As such, that sort of data isn’t shown by default, there are scripting APIs to let you do that for picking and the like in-game, but in those cases you then have control over how things operate to make sense for your situation.

Note: in the left/right/top/bottom type views it might make sense to have this sort of information for that plane, but alas it’s not there today.

cool thanks. you guys did a great job with this by the way. The tutorials help TONS.

From the menu

GameObject->Move To View

That’s what I was looking for