void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.Log("Duplicated MusicAnalyzer gameObject was removed.");
         Destroy(this.gameObject);
     }
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     analyzer       = MusicAnalyzerFree.instance;
     material       = GetComponent <MeshRenderer>().material;
     material.color = basicsColor;
 }