Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMPanningTexture Class Reference

Use this class on a sprite or mesh to have its texture pan according to the specified speed You can also force a sorting layer name More...

Inheritance diagram for MoreMountains.Tools.MMPanningTexture:

Public Attributes

bool TextureShouldPan = true
 whether or not this texture should pan More...
 
Vector2 Speed = new Vector2(10,10)
 the speed at which the texture pans More...
 
string SortingLayerName = "Above"
 the name of the sorting layer to render the texture at More...
 
string MaterialPropertyName = "_MainTex_ST"
 the property name, for example "_MainTex" More...
 
int MaterialIndex = 0
 the index of the material More...
 

Protected Member Functions

virtual void Start ()
 On start, grabs the renderer and/or raw image More...
 
virtual void Update ()
 On update, moves the texture around according to the specified speed More...
 

Protected Attributes

RawImage _rawImage
 
Renderer _renderer
 
Vector4 _position = Vector4.one
 
Vector4 _speed
 
MaterialPropertyBlock _propertyBlock
 

Detailed Description

Use this class on a sprite or mesh to have its texture pan according to the specified speed You can also force a sorting layer name

Member Function Documentation

◆ Start()

virtual void MoreMountains.Tools.MMPanningTexture.Start ( )
protectedvirtual

On start, grabs the renderer and/or raw image

◆ Update()

virtual void MoreMountains.Tools.MMPanningTexture.Update ( )
protectedvirtual

On update, moves the texture around according to the specified speed

Member Data Documentation

◆ _position

Vector4 MoreMountains.Tools.MMPanningTexture._position = Vector4.one
protected

◆ _propertyBlock

MaterialPropertyBlock MoreMountains.Tools.MMPanningTexture._propertyBlock
protected

◆ _rawImage

RawImage MoreMountains.Tools.MMPanningTexture._rawImage
protected

◆ _renderer

Renderer MoreMountains.Tools.MMPanningTexture._renderer
protected

◆ _speed

Vector4 MoreMountains.Tools.MMPanningTexture._speed
protected

◆ MaterialIndex

int MoreMountains.Tools.MMPanningTexture.MaterialIndex = 0

the index of the material

◆ MaterialPropertyName

string MoreMountains.Tools.MMPanningTexture.MaterialPropertyName = "_MainTex_ST"

the property name, for example "_MainTex"

◆ SortingLayerName

string MoreMountains.Tools.MMPanningTexture.SortingLayerName = "Above"

the name of the sorting layer to render the texture at

◆ Speed

Vector2 MoreMountains.Tools.MMPanningTexture.Speed = new Vector2(10,10)

the speed at which the texture pans

◆ TextureShouldPan

bool MoreMountains.Tools.MMPanningTexture.TextureShouldPan = true

whether or not this texture should pan


The documentation for this class was generated from the following file: