public static UIMapManager Instantiate(MapManager manager, UIMapManager prefab, Transform parent, UISortieShip sortieShip) { UIMapManager uIMapManager = (!(prefab != null)) ? Util.InstantiatePrefab($"SortieMap/AreaMap/Map{manager.Map.MstId}", parent.gameObject).GetComponent <UIMapManager>() : Object.Instantiate(prefab); uIMapManager.transform.parent = parent; uIMapManager.transform.localPositionZero(); uIMapManager.transform.localScale = Vector3.one * 1.1f; uIMapManager.Init(manager, sortieShip); return(uIMapManager); }
public static UIMapManager Instantiate(MapManager manager, UIMapManager prefab, Transform parent, UISortieShip sortieShip) { UIMapManager uIMapManager = (!(prefab != null)) ? Util.InstantiatePrefab(string.Format("SortieMap/AreaMap/Map{0}", manager.Map.MstId), parent.get_gameObject(), false).GetComponent <UIMapManager>() : Object.Instantiate <UIMapManager>(prefab); uIMapManager.get_transform().set_parent(parent); uIMapManager.get_transform().localPositionZero(); uIMapManager.get_transform().set_localScale(Vector3.get_one() * 1.1f); uIMapManager.Init(manager, sortieShip); return(uIMapManager); }