void Awake() { GameObject board = GameObject.Find("Board"); if (board != null) { matchDetector = board.GetComponent <MatchDetector>(); } else { Debug.Log("Couldn't find Board"); } }
// Use this for initialization void Awake() { block = GetComponent <Block>(); matchDetector = GameObject.Find("Board").GetComponent <MatchDetector>(); }
// Use this for initialization void Awake() { board = GetComponent<Board>(); matchDetector = GameObject.Find("Board").GetComponent<MatchDetector>(); }
// Use this for initialization void Awake () { board = GetComponent<Board> (); detector = GetComponent<MatchDetector> (); boardController = GetComponent<BoardController> (); }
void Awake() { matchDetector = (MatchDetector)FindObjectOfType(typeof(MatchDetector)); }
void Awake() { matchDetector = GameObject.Find("Minigame").GetComponent <MatchDetector>(); }