private void SpawnObject() { GameObject objectToSpawn = ObstaclePool.Instance(ObjectNames.Obstacle1); objectToSpawn.transform.position = Vector3.right * 5; }