Search Unity

Reposition UI element while it is disabled.

Discussion in 'UGUI & TextMesh Pro' started by yakm, Oct 9, 2014.

  1. yakm

    yakm

    Joined:
    Sep 12, 2014
    Posts:
    24
    Disable an UI element in the inspector or use SetActive(false);

    Move it's position using transform.localPosition = new Vector3(x,y,z);

    Enable the UI element and it has not moved.


    I believe that in the most recent update 20, this "feature" (disabled ui elements cannot be moved) was added.. how to i disable it?

    Attached project.

    Use Y to move the object, and T to disable or enable the object.

    How to recreate issue.

    Load scene test
    Press play.
    Press Y to see object moves.
    Press T to disable object
    Press Y to move the object.
    Press T to enable object, and see that it has not moved.
     

    Attached Files:

    Last edited: Oct 9, 2014
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    It's a bug in beta 20. The fix should arrive in beta 21.