- Home /
Question by
unity_EvZqHtxAwguBkw · May 05, 2020 at 09:18 PM ·
c#unity 5unityeditor
How can I get global coordinates of object
I need to get global coordinates of gameobject like on the screen.
screenshot-2.png
(280.5 kB)
screenshot-4.png
(281.4 kB)
Comment
Answer by fblast1 · May 06, 2020 at 01:06 AM
you can use the transform.position
this gives you global ones
transform.localPosition
this will gives you the local coordinates
for the Images part.
If I didnt misunderstood the images
The first referred to by transform.up
The Second referred to by Vector2.up
Regards
Your answer
Follow this Question
Related Questions
How Can I get the mouse to Cycle Through Animations Each Time I click it? Please Help! 1 Answer
Please Help Me With My Stamina Bar! 1 Answer
Making Everything Public 0 Answers
How to use a boolean to control another object boolean using C# script 4 Answers
unity showing download file delay 0 Answers