Author Topic: Dynamically change UIPanel TextureMask Offset value  (Read 1585 times)

eco_bach

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Dynamically change UIPanel TextureMask Offset value
« on: January 30, 2017, 02:44:49 PM »
Ok, so i am successfully masking using a texture mask. Now I need to dynamically change the offset of this mask.
From another class I have a reference to my UIPanel as 

public UIPanel overlayPanel;

and then a reference to the actual Texture2D Texture Mask as  overlayPanel.clipTexture;

So, how do I change the x offset of this Texture2D thru code?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamically change UIPanel TextureMask Offset value
« Reply #1 on: February 04, 2017, 03:39:10 AM »
Clip texture is always tied to the panel. You can adjust the panel's rect, which will effectively move the clipped texture.