unity material offset script
using UnityEngine;public class Example : MonoBehaviour
{
// Scroll main texture based on time float scrollSpeed = 0.5f;
Renderer rend; void Start()
{
rend = GetComponent<Renderer> ();
} void Update()
{
float offset = Time.time * scrollSpeed;
rend.material.SetTextureOffset("_MainTex", new Vector2(offset, 0));
}
}
Also in C#:
- how to change the title of the console in c#
- image filter
- unity set position
- c# asp.net hover tooltip
- list c#
- decalre an int list mvc
- print line in python
- textblock line break
- How to search for a string from readline in c#
- datagridview column color c#
- invalidoperationexception c# ui thread
- c# how to add newline on text box
- chase object unity
- HashSet C# append
- unity draw wire square
- How to get the world position of the edge of an object?
- if statement conditions c#
- bundle.config in mvc is missing
- c# getter setter
- how to record number of times using application in c#
- iphone
- how to edit a c# list
- unity enum
- c# changimg to one decimal place