コード例 #1
0
ファイル: MapCreate.cs プロジェクト: gangzi4494/bigmap
    public void CreateMap(MapIndex mapIndex)
    {
        string mapName = MapIndexConfig.GetMapNameByMapIndex(mapIndex);

        string mapPath = FolderMgr.GetMapPrefabPath();

        string mapFrefab = mapPath + "/" + mapName;

        Object obj = Resources.Load(mapFrefab);

        if (obj == null)
        {
            Debug.Log("path is " + mapFrefab);
            return;
        }

        GameObject instance = GameObject.Instantiate(obj) as GameObject;
    }