TextureMove

Summary

This behaviour will cause the asset's texture to scroll to create moving or rolling texture. This can be used to create simulated effects such as moving conveyors or running water.

Parameters

Speed

Type: Float Bindable Default: 1

The speed in which the texture will move.

Direction

Type: Vector2 Default: 1,0

The direction in which the texture will move. Direction is given as X and Y values respectively and values of either 1, 0 or -1. A value of 0 indicates no motion along the selected axis. A value of 1 indicates motion along the axis as right along the X axis or up along the Y axis. Whereas a value of -1 will invert the motion to either left along the X axis or down along the Y axis.

For example:

A direction of 0,1 will move the texture upwards. A direction of -1,0 will move the texture to the left.

Name

Type: Text Default: _MainTex

The name of the texture channel to modify. This value is designated by the material from Unity. Usually this will be set to _MainTex.

Examples

<texturemove speed="3" direction="-1,1" />
The above code will add a behaviour to the asset which will move the texture at a speed of 3 at a direction of diagonal left ( -1 ) and up ( 1 ).