Hi,
As I understood, uGUI elements such as buttons live in their own Canvas world and their coordination is different than game objects’.
I want my character to move to a button position, how can I get that button’s world position so I can move my character towards it?
Thanks
Im not sure if this help you but im writing a text under the button on button position in canvas and im using this code for button position.
This script is on button
public Vector3 getposition;
public void ButtonPosition(){
getposition = transform.GetComponent<RectTransform>().position;
}
It give you a button position, i have a method because i need to call in pointer enter.