Author Topic: Seeking Advice on UITable/UIGrid with Many Entries  (Read 4904 times)

Holdwick

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Seeking Advice on UITable/UIGrid with Many Entries
« on: February 14, 2014, 05:50:28 PM »
Hi there!

I'm working on a level editor for our game Distance and I'm trying to figure out the best way to make a hierarchy menu in NGUI like the one built into Unity. Our levels are made up of level layers that hold the gameobjects in the level. Currently I am using a UITable of layer UITables of Buttons to all of the gameobjects. It currently runs very slowly, it basically locks up the game if I try to use that menu. Our levels can hold many objects in them (over 1000) and I'm trying to figure out the best way to organize that many buttons without performance issues.

I've attached pictures of the Unity hierarchy menu and the hierarchy menu that is currently in our level editor. Really I'm just looking for any suggestions or advice on how to do a menu like that in NGUI.

Thanks so much for any advice or help  ;D
Kyle "Goin' for it since the early 90s" Holdwick
Developer | REFRACT
@kyleholdwick

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Seeking Advice on UITable/UIGrid with Many Entries
« Reply #1 on: February 15, 2014, 02:11:13 AM »
Don't use UITables. Write your own positioning logic that would do so hierarchically. For each object, run through the children and call their reposition function with a new (+1) offset value. Inside that reposition function use this offset value to position the object.