Soo i very new to programing and Unity and im trying to start a project but it allways show this error here and i dont know what to doo please help me Screenshot by Lightshot
using UnityEngine;
using System.Collections;
public class ScrollingUVs : MonoBehaviour
{
public int materialIndex = 0;
public Vector2 uvAnimationRate = new Vector2( 1.0f, 0.0f );
public string textureName = "_MainTex";
public bool ScrollBump = true;
public string bumpName = "_BumpMap";
Vector2 uvOffset = Vector2.zero;
void LateUpdate()
{
uvOffset += ( uvAnimationRate * Time.deltaTime );
if( renderer.enabled )
{
renderer.materials[ materialIndex ].SetTextureOffset( textureName, uvOffset );
if(ScrollBump)
{
renderer.materials[ materialIndex ].SetTextureOffset( bumpName, uvOffset );
}
}
}
}