void Start() { skull = GameObject.FindGameObjectWithTag("Skull").GetComponent <ToothManager>(); // Destroy the game object after 2 seconds. Destroy(gameObject, 3.0f); }
void Start() { _toothManager = GetComponentInParent <ToothManager>(); if (_toothManager == null) { throw new System.Exception("ToothManager not found amoung Tooth's parents."); } }
// Use this for initialization void Start() { skull = GameObject.FindGameObjectWithTag("Skull").GetComponent <ToothManager>(); FindTooth(); }