Author Topic: [Resolved]How to change Unified to None(UIWidget) by code?  (Read 2941 times)

liuyi

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
[Resolved]How to change Unified to None(UIWidget) by code?
« on: February 14, 2014, 02:04:31 AM »

This is my method:
       UIWidget widget = currentPage.GetComponent<UIWidget>();
        widget.leftAnchor.target = null;
        widget.rightAnchor.target = null;
        widget.topAnchor.target = null;
        widget.bottomAnchor.target = null;

« Last Edit: February 14, 2014, 02:29:08 AM by liuyi »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Resolved]How to change Unified to None(UIWidget) by code?
« Reply #1 on: February 14, 2014, 05:08:32 AM »
widget.SetAnchor((Transform)null); works too.