I was not able to figure it out from the documentation so I apologize if it is obvious. The question is: how can I (through code) set the reference points of Unified anchoring of a widget to Top/Bottom/Left/Right enum values that NGUI inspector UI always offers you to use? I have not found any argument like that in the SetAnchor method or among the properties of individual anchors, which leaves me reliant on rather ugly hack where I match the pixel dimensions and position of an anchored widget to those of it's parent and hope that NGUI auto-selects the appropriate reference mode on each of the four anchor points. It usually does, because mode I want has the closest relative offset (zero), but I'd rather avoid doing that.
I understand that those handy enums and Unified anchoring mode on the whole are probably just editor-side wrapping of underlying auto-generated Transforms and underlying Advanced anchoring mode, and I see the methods allowing you to set reference Transforms for anchors, but I'm not seeing any way to fetch those points in the first place. I can calculate the 4 corner points and 4 side midpoints myself, of course, and create my own transforms there, but that would be very dirty and I'd rather prefer to find a way to get a reference to existing ones.