Author Topic: UITexture disappears  (Read 17591 times)

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
UITexture disappears
« on: August 06, 2012, 03:30:02 PM »
I am trying a small test with NGUI.  I created a New UI, then created a New Widget -- UITexture.  I place a texture on it and can see the rectangle in the Game view.  I then hit Play an the texture disappears from the Game view.  It does not come back when I hit stop.  Also, even though I see that the game object still has the UITexture script, the other info, like the Depth and Make Pixel-Perfect UI elements have gone away.  I have to reset the Texture in order for them to come back.  I am using 3.5.4.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #1 on: August 06, 2012, 07:03:32 PM »
What version of NGUI do you use? There was an issue in one of the earlier versions but has since been fixed.

vei

  • Guest
Re: UITexture disappears
« Reply #2 on: August 07, 2012, 05:06:38 AM »
Having the same problem. I'm using Unity 3.5.4 with NGUI 2.1.3.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #3 on: August 07, 2012, 12:20:15 PM »
Hmm you're right. Something must have gotten broken in the last update. Lemme fix it.

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UITexture disappears
« Reply #4 on: August 10, 2012, 01:14:27 PM »
Looking forward to the fix.  Thanks.

PhilipC

  • Guest
Re: UITexture disappears
« Reply #5 on: August 10, 2012, 01:22:17 PM »
Have you updated to 2.1.4? i believe that we have already fixed this.... Let us know if its still not working.

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UITexture disappears
« Reply #6 on: August 10, 2012, 04:06:11 PM »
I updated to 2.1.4 and Unity 3.5.5.  It's still broken.  I can send you my project if it would help.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #7 on: August 10, 2012, 04:50:27 PM »
Try this UITexture file and see if it still happens.

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UITexture disappears
« Reply #8 on: August 10, 2012, 05:04:40 PM »
Same thing.  After 3 or 4 plays, it just chokes and the custom property window for the UITexture goes away.

I don't know if it matters, but I am setting the mainTexture property on my UITexture in script when my game is running.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #9 on: August 10, 2012, 05:06:45 PM »
If you set it while the game is running, then it will not (and should not) persist when you stop the game.

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UITexture disappears
« Reply #10 on: August 10, 2012, 05:08:52 PM »
If you set it while the game is running, then it will not (and should not) persist when you stop the game.

How am I supposed to modify the Depth & Pivot etc if that UI goes away?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #11 on: August 10, 2012, 05:10:38 PM »
Set the texture edit mode.

citizen12

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UITexture disappears
« Reply #12 on: August 10, 2012, 05:14:57 PM »
Set the texture edit mode.

Not sure what you mean by that.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture disappears
« Reply #13 on: August 10, 2012, 06:19:55 PM »
In the editor, while the application is not running, choose a texture that will be used by UITexture by selecting it via the inspector window.

RocketPop Games

  • Guest
Re: UITexture disappears
« Reply #14 on: August 10, 2012, 09:08:56 PM »
FYI RenderTextures made this happen every time to me (drop a RTT on a UITexture texture inspector) - but the patched file above fixed it . I spoke too soon. The updated file above makes it work in edit mode but after playing it disappears. The temporary fix is to make a material for the RT, and then it works..

Thanks!
« Last Edit: August 10, 2012, 09:13:14 PM by RocketPop Games »