Author Topic: UI invisible in scene view & cannot get grid to work  (Read 1455 times)

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
UI invisible in scene view & cannot get grid to work
« on: February 04, 2014, 07:37:34 AM »
Another headache. I have a grid containing 6 children. I want each of those children to contain a grid as well- so I will end up with a horizontal grid containing the six children, and each child will have a grid containing other objects. I assumed I would be able to just create 2nd grid in the same way as I had done for the first- but I guess not? I've attached an image showing what I see- it's like what is seen in the game view is the exact opposite of what is seen in the scene view. If the grid was working correctly I should be able to see the 4 sprites below the 'Improvement Cost' button in the game view. I have made no modifications to the camera or root or anything, I simply have no idea what is happening. I'm using the latest version of NGUI.

Thanks,

EDIT: Lo and behold, I have fixed the grid- for some reason it had a weird z position. However I still can't see anything in the scene view.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI invisible in scene view & cannot get grid to work
« Reply #1 on: February 04, 2014, 08:55:19 AM »
You seem to have a widget on the same game object as your scroll view... why?

UIPanel has a rect, so does the widget. You seem to have the widget anchored, but the panel's anchors are different. What are you trying to do here? Either have a widget, or a panel, not both. Get rid of the UIWidget.

Shemamforash

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: UI invisible in scene view & cannot get grid to work
« Reply #2 on: February 04, 2014, 09:50:46 AM »
The widget is on the scrollview in order to anchor it at a certain position on the parent object. If I remove it the panel falls behind the main label (above the scrollview). Also this does not solve my inability to see any of the ui in the scene view which is the main problem. I have attached a picture do demonstrate what happens if i remove the widget.

EDIT: Just noticed widget also has anchors. Why have I never seen this before!? Durr...
EDIT2: The scene view suddenly decided to fix itself whilst i was watching it.
« Last Edit: February 04, 2014, 10:34:13 AM by Shemamforash »