I am working with Canvas and prefabricated Text. Through script i want to place the text one below the other. The problem is that obj.position += new Vector(0,33,0); where 33 is height of the object, is not actually 33 when looking at the inspector.
even translation of 1 through script is 38.5 in inspector. WHY?
here is the code
selfTransform = this.transform.gameObject.GetComponent<RectTransform>();
selfTransform.position = new Vector3 (0, 1, 0);
m sorry, but i have been using RectTransform only. the code was not properly displayed, hence the confusion, but now i formatted it. As you can see, m using RectTransform only. Further more, the problem is not just here, even if i scale something to a value, it won't be scaled to that value, some other value is seen on runtime. I tried creating a new project, same issue. If i make x position into 30 using script, on runtime, i should see it at 30 right? m thinking of reinstalling unity, but then i'll have to set everything up again.
– nishant619