Aloha,
Right now i am fighting with a instantiate of an existing button and placing it some pixels above it…
So now i am just trying to copy this button via C# code…
public GameObject answerButton;
public GameObject canvas;
private GameObject answerButton1;
//
answerButton1 = Instantiate(answerButton,new Vector3(answerButton.transform.position.x, answerButton.transform.position.y - 50, answerButton.transform.position.z),answerButton.transform.rotation);
var rectTransform = answerButton1.GetComponent<RectTransform>();
rectTransform.SetParent(canvas.transform);
And that works actually…but the coordinates of this button…are screwed up :<