// ----------------- static public TouchControl CreateStretchyControl( System.Type controlType, TouchControlPanel panel, Transform root, string name, Rect regionRect, float localDepth) { TouchControl c = (TouchControl)CreateStretchyRectTr(controlType, panel.transform, name, regionRect, localDepth); c.InvalidateHierarchy(); return(c); }
// ----------------- static public TouchControl CreateStaticControl( System.Type controlType, TouchControlPanel panel, Transform root, string name, Vector2 anchorPos, Vector2 offset, float size, float localDepth) { TouchControl c = (TouchControl)CreateConstSizeRectTr(controlType, panel.transform, name, anchorPos, offset, Vector2.one * size, localDepth); c.InvalidateHierarchy(); return(c); }