Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: merichuel on December 11, 2014, 04:38:04 AM

Title: Moving UIGrid but parent UIpanel won't show movement [Solved]
Post by: merichuel on December 11, 2014, 04:38:04 AM
Hello, I'm kind of new here but i'm having some problems here.
I have a UIPanel with soft clip for the center of the screen, it's child is a UIGrid that at the same time has 10 childs, all of them only have a box collider. There are no more scripts here.
I move the position of the UIGrid gameobject with two buttons like this:

public void GoLeftChapter()
    {
        Vector3 _aux = gridGO.transform.localPosition;
        _aux.x -= gridGO.GetComponent<UIGrid>().cellWidth;
       gridGO.transform.localPosition = _aux;
       gridGO.transform.parent.GetComponent<UIPanel>().Refresh();
    }

(I've tried without the refresh also)

And I can see in the scene the gameobject moving, but the UIPanel still shows the same stuff in the same possitions, you can see it in the images i'm attaching

Am i missing something?

Title: Re: Moving UIGrid but parent UIpanel won't show movement
Post by: merichuel on December 11, 2014, 05:19:47 AM
OK, SOLVED. I was stupid and marked the UIPANEL with Static checkbox without noticing.