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