// Use this for initialization void Start() { trans = transform; levelTraps = GameObject.FindObjectOfType<LevelTraps>(); if(levelTraps == null) { Debug.LogError("--Can't Find LevelTraps--" + "//Trap placer can't find a LevelTraps in the scene. Removing Trap placer."); Destroy(this); } grid = GameObject.FindObjectOfType<Grid>(); if(grid == null) { Debug.LogError("--Can't Find Grid--" + "//Trap placer can't find a Grid in the scene. Placing will not work properly"); } }
// Use this for initialization void Start() { traps = GameObject.FindObjectOfType<LevelTraps>(); }