// Start is called before the first frame update void Start() { if (gameObject.tag == "EnemyRagdoll") { GameObject eSystem = GameObject.Find("EventSystem"); FloorHandler fHandler = (FloorHandler)eSystem.GetComponent(typeof(FloorHandler)); fHandler.addEnemy(gameObject); } }