Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: BehindTheStone on January 22, 2014, 01:26:36 PM

Title: UISprite Offscreen - Tris Count still goes up
Post by: BehindTheStone 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
(http://s14.directupload.net/images/user/140122/qydwkgdo.png)

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

(http://s1.directupload.net/images/user/140122/b3ho3bsc.png)
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.
Title: Re: UISprite Offscreen - Tris Count still goes up
Post by: ArenMook 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.
Title: Re: UISprite Offscreen - Tris Count still goes up
Post by: BehindTheStone on January 23, 2014, 02:48:04 AM
Ah alright, thanks for the clarification.