Author Topic: Moving UIGrid but parent UIpanel won't show movement [Solved]  (Read 3742 times)

merichuel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Moving UIGrid but parent UIpanel won't show movement [Solved]
« 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?

« Last Edit: December 11, 2014, 05:30:01 AM by merichuel »

merichuel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Moving UIGrid but parent UIpanel won't show movement
« Reply #1 on: December 11, 2014, 05:19:47 AM »
OK, SOLVED. I was stupid and marked the UIPANEL with Static checkbox without noticing.