//init map function public static Map initMap(Vector3 pos, GameTypes.MapType mt, Region reg, int seed) { Map map = GameObject.Instantiate(getMap(mt.ToString()), reg.gameObject.transform).GetComponent <Map>(); map.gameObject.transform.position = pos; map.mType = mt; reg.addMap(map); map.mSeed = seed; return(map); }