Quantcast
Viewing all articles
Browse latest Browse all 74

4.6.1 GUI. Get Pos Y property from script?

I am doing some black magic that can hopefully make use of the Pos Y property on uGUI elements. I'd be SO happy if I could just return the correct value for this, but whenever I try, it doesn't work. I am using a WorldSpace canvas. I have tried to Debug.Log() the following: - recTransform.rect.position.y - rectTransform.anchoredPosition.y - rectTransform.position.y - rectTransform.anchoredPosition3D.y it always returns zero like in the following example, except for anchoredPosition.y, which returns 2.0 for some reason.... wtf... what it SHOULD return is -10 :/ I hope using VerticalLayout component hasn't LOCKED my values to zero without telling me or something.... ![alt text][1] [1]: /storage/temp/41175-capture.png

Viewing all articles
Browse latest Browse all 74

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>