void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Debug.Log("gameObject not set."); Destroy(this.gameObject); } }
// Use this for initialization void Start() { analyzer = ColourTerrain.instance; material = GetComponent <MeshRenderer>().material; material.color = basicsColor; }