A class in Root.Township, the global namespace.
Scrolls a material's main texture offset over time on a renderer, using its own copy of the material.
Constructors
| Member | What it is |
|---|
TextureOffsetAnimator() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private Material instanciatedMaterial | The material copy being animated. |
private Material materialToAnimate | Source material that gets copied. |
private Vector2 offsetAnimationPerSecond | Texture offset change per second. |
private Renderer targetRenderer | Renderer given the copied material. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void Awake() | Copies the material and puts the copy on the target renderer. |
private void LateUpdate() | Moves the texture offset by offsetAnimationPerSecond times the frame time. |