public void InitOrUpdateView(CampaignModeConfig mode)
    {
        this.mode = mode;
        if (prefab == null)
        {
            prefab = LoadResourceController.GetCampaignMapView();
        }

        int i = 0;

        for (; i < mode.mapList.Count; i++)
        {
            if (i < mapViews.Count)
            {
                mapViews[i].SetupView(mode.mapList[i]);
            }
            else
            {
                var view = Instantiate(prefab, mapViewAnchor);
                view.SetupView(mode.mapList[i]);
                mapViews.Add(view);
                snap.AddRectTransform(view.GetComponent <RectTransform>());
            }
        }
        snap.SetupSnap(RefreshUI);
    }
    private void InitOrUpdateView()
    {
        int i = 0;

        for (; i < collection.worldConfig.modeConfigList.Count; i++)
        {
            if (i < campaignViews.Count)
            {
                campaignViews[i].SetupView(collection.worldConfig.modeConfigList[i]);
            }
            else
            {
                var view = Instantiate(prefab, campaignViewAnchor);
                view.SetupView(collection.worldConfig.modeConfigList[i]);
                campaignViews.Add(view);
                snap.AddRectTransform(view.GetComponent <RectTransform>());
            }
        }
        snap.SetupSnap(RefreshUI);
    }