Author Topic: UISprite Offscreen - Tris Count still goes up  (Read 1515 times)

BehindTheStone

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 135
    • View Profile
UISprite Offscreen - Tris Count still goes up
« on: January 22, 2014, 01:26:36 PM »
Hey there.

So, I noticed something. I don't know if I just set things up the wrong way or this is just the "NGUI way".

Have a look at these stats. As you see I have some UI-Elements. The MenuBook is enabled but offscreen.
The Triscount is 244


Now, when I TriggerEnter the left blue cube I get some Items into my Inventory:


4 new Items = 8 Tris

The TrisCount goes up to 252. Why is that? I mean the Book isn't even "displayed" by the UI-Camera. Shouldn't it only go up to 252 Tris when Camera renders the whole book, meaning when the Book is in the middle of the screen?

So if hit my BookButton which tweens the Book down, the count stays the same.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISprite Offscreen - Tris Count still goes up
« Reply #1 on: January 22, 2014, 09:37:58 PM »
Moving something off-screen doesn't mean that it won't be drawn. You should disable the object you've moved off-screen. UIPlayTween actually has an option to do that.

BehindTheStone

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 135
    • View Profile
Re: UISprite Offscreen - Tris Count still goes up
« Reply #2 on: January 23, 2014, 02:48:04 AM »
Ah alright, thanks for the clarification.