Author Topic: Scrolling Texture  (Read 2454 times)

tatelax

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Scrolling Texture
« on: September 07, 2013, 12:59:49 PM »
Hi All,

I'm trying to make the sprite on my UISprite scroll, similar to adjusting the offset values on a material. How is this done?

Thanks,

-- Tate

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrolling Texture
« Reply #1 on: September 07, 2013, 11:02:43 PM »
You can't do it with NGUI.

Atmey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: Scrolling Texture
« Reply #2 on: September 08, 2013, 01:24:34 AM »
I understand you cannot do it using UISprite, what about using the UITexture?

My work around for a background, create a plane and add a scrolling texture on it.

Atmey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: Scrolling Texture
« Reply #3 on: September 08, 2013, 05:16:37 AM »
Apparently it is achievable with a nice effect using the method I suggested:

Demo: (Keyboard only, click options)
https://dl.dropboxusercontent.com/u/2853559/WebDemos/ngui-animated-tiled-texture/WebBuild-8-9-2013.html

Sorry I can't share the source code as it is entangles with other stuff.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrolling Texture
« Reply #4 on: September 09, 2013, 01:09:30 AM »
Yup, with UITextures you're just working with materials, and this lets you do what you want.