using UnityEngine;
using System.Collections;
public class block_start : MonoBehaviour {
void OnMouseDown () {
Debug.Log{"Got a mouse click\"};
renderer.material.color = Color.blue;
}
void OnMouseUp() {
Debug.Log ("mouse is up\");
renderer.Material.Color = Color.white
}
}
using UnityEngine;
using System.Collections;
public class block_start : MonoBehaviour
{
void OnMouseDown ()
{
Debug.Log("Got a mouse click");
gameObject.GetComponent<Renderer>().material.color = Color.blue;
}
void OnMouseUp()
{
Debug.Log ("mouse is up");
gameObject.GetComponent<Renderer>().Material.Color = Color.white
}
}
You have material with a M, needs to be lower case. Material is a class, same with Color.
renderer.material.color = Color.white;