private void spawnThing(ThingToSpawn subject) { GameObject newObj = GameObject.Instantiate(subject.prefab, subject.position, new Quaternion(0, 0, 0, 0)); _Vampire spawnClass = newObj.GetComponent <_Vampire>(); spawnClass.initialize(subject.waypoints, subject.dif); }