Exemplo n.º 1
0
        public void saveInitialConfig(string path, InitialConfigurations config)
        {
            var serializer = new XmlSerializer(typeof(InitialConfigurations));
            var encoding   = Encoding.GetEncoding("UTF-8");

            if (File.Exists(path))
            {
                File.Delete(path);
            }

            using (var stream = new StreamWriter(path, false, encoding))//new FileStream(path, FileMode.Create))
            {
                serializer.Serialize(stream, config);
            }
        }
Exemplo n.º 2
0
        public InitialConfigurations loadInitialConfig()
        {
            var serializer = new XmlSerializer(typeof(InitialConfigurations));

            string path = Path.Combine(Application.persistentDataPath, "ConfigFiles/initialConfig.xml");

            if (File.Exists(path))
            {
                var encoding = Encoding.GetEncoding("UTF-8");
                using (var stream = new StreamReader(path, encoding)) //new FileStream(path, FileMode.Open))
                {
                    return(serializer.Deserialize(stream) as InitialConfigurations);
                }
            }
            else
            {
                InitialConfigurations config = fillConfig();
                saveInitialConfig(Path.Combine(Application.persistentDataPath, "ConfigFiles/initialConfig.xml"), config);
                return(config);
            }
        }
        private void configLoadHelper(InitialConfigurations config)
        {
            List<BarrierConfigurations> conf = config.barrierConfig;

            texturePaths = new string[conf.Count];
            materialPaths = new string[conf.Count];
            isTextureChanged = new bool[conf.Count];

            Transform parentContent = barrierMenu.transform.Find("Panel").Find("Scroll Rect").Find("Content Panel");

            var children = new List<GameObject>();
            foreach (Transform child in parentContent) children.Add(child.gameObject);
            children.ForEach(child => Destroy(child));

            for(int i = 0 ; i < conf.Count ; i++)
            {
                isTextureChanged[i] = false;
                texturePaths[i] = "";
                materialPaths[i] = conf[i].Path;

                GameObject skinItem = (GameObject)MonoBehaviour.Instantiate(Resources.Load("Prefabs/Menu/BarrierSkin"));
                skinItem.name = "BarrierSkin " + i;
                skinItem.transform.SetParent(parentContent);

                Texture2D colorText;
                Material mat = (Material)Resources.Load(config.barrierConfig[i].Path);
                colorText = (Texture2D)mat.mainTexture;
                skinItem.transform.Find("Panel").Find("RawImage").GetComponent<RawImage>().texture = colorText;
                skinItem.transform.Find("Panel").Find("TextName").GetComponent<Text>().text = config.barrierConfig[i].name;
                skinItem.transform.Find("Panel").Find("TextTextureChange").GetComponent<Button>().onClick.AddListener(delegate { EditTextureClick(skinItem); });
                skinItem.transform.Find("Panel").Find("InputField_Height").GetComponent<InputField>().text = config.barrierConfig[i].height.ToString();
                skinItem.transform.Find("Panel").Find("InputField_Thickness").GetComponent<InputField>().text = config.barrierConfig[i].width.ToString();

            }
        }
        private void configLoadHelper(InitialConfigurations config)
        {
            List<HighwayConfigurations> conf = config.highwayConfig;

            texturePaths = new string[conf.Count];
            materialPaths = new string[conf.Count];
            isTextureChanged = new bool[conf.Count];

            Transform parentContent = highwayMenu.transform.Find("Panel").Find("Scroll Rect").Find("Content Panel");

            var children = new List<GameObject>();
            foreach (Transform child in parentContent) children.Add(child.gameObject);
            children.ForEach(child => Destroy(child));

            for (int i = 0; i < conf.Count; i++)
            {
                isTextureChanged[i] = false;
                texturePaths[i] = "";
                materialPaths[i] = conf[i].materialPath;

                GameObject skinItem = (GameObject)MonoBehaviour.Instantiate(Resources.Load("Prefabs/Menu/HighwaySkin"));
                skinItem.name = "HighwaySkin " + i;
                skinItem.transform.SetParent(parentContent);

                Texture2D colorText;
                Material mat = (Material)Resources.Load(conf[i].materialPath);
                colorText = (Texture2D)mat.mainTexture;
                skinItem.transform.Find("Panel").Find("RawImage").GetComponent<RawImage>().texture = colorText;
                skinItem.transform.Find("Panel").Find("Text_Type").GetComponent<Text>().text = conf[i].type;
                skinItem.transform.Find("Panel").Find("Text_ChangeTexture").GetComponent<Button>().onClick.AddListener(delegate { EditTextureClick(skinItem); });
                skinItem.transform.Find("Panel").Find("InputField_Width").GetComponent<InputField>().text = conf[i].size.ToString();
                skinItem.transform.Find("Panel").Find("InputField LeftSize").GetComponent<InputField>().text = conf[i].leftSidewalkSize.ToString();
                skinItem.transform.Find("Panel").Find("InputField RightSize").GetComponent<InputField>().text = conf[i].rightSidewalkSize.ToString();
                skinItem.transform.Find("Panel").Find("ToggleLeftSideWalk").GetComponent<Toggle>().isOn = conf[i].leftSidewalk;
                skinItem.transform.Find("Panel").Find("ToggleRightSideWalk").GetComponent<Toggle>().isOn = conf[i].rightSidewalk;

            }
        }
Exemplo n.º 5
0
        public InitialConfigurations fillConfig()
        {
            InitialConfigurations config = new InitialConfigurations();

            //HIGHWAY CONFIGURATIONS
            config.highwayConfig = new List <HighwayConfigurations>();
            string[] highwayTypes = new string[] { "HighwayResidential", "HighwayPrimary", "HighwaySecondary", "HighwayTertiary", "HighwayTertiaryLink",
                                                   "HighwayUnclassified", "HighwayService", "HighwayPath", "HighwayFootway",
                                                   "HighwayPavement", "Railway", "River" };
            float[] highwaySizes = new float[] { 6.0f, 10.0f, 10.0f, 8.0f, 8.0f, 7.0f, 4.0f, 6.0f, 4.0f, 2.0f, 1.5f, 8.0f };

            string[] highwayMaterials = new string[] { "Materials/Highway/Mat_Residential", "Materials/Highway/Mat_Primary",
                                                       "Materials/Highway/Mat_Secondary", "Materials/Highway/Mat_Tertiary", "Materials/Highway/Mat_TertiaryLink", "Materials/Highway/Mat_Unclassified",
                                                       "Materials/Highway/Mat_Service", "Materials/Highway/Mat_Path", "Materials/Highway/Mat_Footway",
                                                       "Materials/Highway/Mat_Pavement", "Materials/Highway/Mat_Railway", "Materials/Highway/Mat_River" };

            for (int k = 0; k < highwayTypes.Length; k++)
            {
                HighwayConfigurations hc = new HighwayConfigurations();
                hc.size         = highwaySizes[k];
                hc.type         = highwayTypes[k];
                hc.materialPath = highwayMaterials[k];
                config.highwayConfig.Add(hc);
            }

            //RIVER CONFIGURATIONS [NOT USED]
            config.riverConfig = new RiverConfigurations();
            config.riverConfig.materialPath = "Materials/River/??";
            config.riverConfig.size         = 6.0f;

            //AREA CONFIGURATIONS [NOT USED]
            config.areaConfig = new AreaConfigurations();
            config.areaConfig.defaultColor = new Vector3(0.3f, 0.3f, 0.3f);

            //BARRIER CONFIGURATIONS
            config.barrierConfig = new List <BarrierConfigurations>();

            float[]  barrierHeight  = new float[] { 2.0f, 1.5f, 15.0f, 3.0f, 2.0f };
            float[]  barrierWidth   = new float[] { 0.1f, 0.3f, 3.0f, 0.3f, 0.5f };
            string[] barrierTypes   = new string[] { "Fence", "Wall", "City Wall", "Retaining Wall", "Default" };
            string[] barrierPrefabs = new string[] { "Materials/Barrier/chainlink", "Materials/Barrier/BrickWall",
                                                     "Materials/Barrier/CityWall", "Materials/Barrier/RetainingWall",
                                                     "Materials/Barrier/Default" };
            for (int k = 0; k < barrierTypes.Length; k++)
            {
                BarrierConfigurations bar = new BarrierConfigurations();
                bar.width  = barrierWidth[k];
                bar.height = barrierHeight[k];
                bar.Path   = barrierPrefabs[k];
                bar.name   = barrierTypes[k];
                config.barrierConfig.Add(bar);
            }

            //BUILDING CONFIGURATIONS
            config.buildingConfig = new BuildingConfigurations();
            config.buildingConfig.defaultColor = new Vector3(0.5f, 0.5f, 0.5f);
            config.buildingConfig.minheight    = 14.0f;
            config.buildingConfig.maxheight    = 18.0f;
            config.buildingConfig.defaultSkins = new List <BuildingMaterial>();

            List <string> skinNames = new List <string>();

            skinNames.Add("White Concrete");
            skinNames.Add("Dark Brick");
            skinNames.Add("Light Brick");
            skinNames.Add("White Concrete 2");
            skinNames.Add("Dark Brick 2");
            skinNames.Add("Antic Stones");
            skinNames.Add("Kiosk");
            //---------------------
            skinNames.Add("White Historic");
            skinNames.Add("Yellow-Orrange Concrete");
            skinNames.Add("Wide Historic");
            skinNames.Add("Old Concrete 2-floor");
            skinNames.Add("Old Stone");
            skinNames.Add("White Stone");
            skinNames.Add("White Concrete 3");
            skinNames.Add("Brick");
            skinNames.Add("Old Concrete with Shop");
            skinNames.Add("Brick 2");
            skinNames.Add("Old Concrete");
            skinNames.Add("Yellow Historic");
            skinNames.Add("Yellow Concrete with Shop");
            skinNames.Add("Brown-White Concrete");
            skinNames.Add("Orange Wide");
            skinNames.Add("White Stone 2");
            skinNames.Add("White Stone Modern");
            skinNames.Add("White Concrete Modern");
            skinNames.Add("Office Type");
            skinNames.Add("White Concrete 4");

            float[] skinSizes = new float[] { 16.0f, 16.0f, 12.0f, 8.0f, 8.0f, 30.0f, 2.0f, 12.0f, 20.0f, 24.0f, 8.0f, 16.0f, 8.0f, 8.0f, 8.0f, 12.0f, 16.0f, 16.0f, 16.0f, 12.0f, 16.0f, 24.0f, 12.0f, 16.0f, 20.0f, 16.0f, 16.0f };

            //float[] skinSizes = new float[] {16.0f,16.0f,12.0f,8.0f,8.0f,30.0f,2.0f};
            List <string> colorTexturePath = new List <string>();

            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture1.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture2.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture3.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture4.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture5.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/towerTexture.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/KioskTexture.jpg");

            List <string> normalTexturePath = new List <string>();

            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building1Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building2Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building3Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building4Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building5Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/NormalMapTower.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/NormalMapKiosk.png");

            List <string> specularTexturePath = new List <string>();

            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building1Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building2Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building3Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building4Specular.png");
            specularTexturePath.Add("");
            specularTexturePath.Add("");
            specularTexturePath.Add("");


            for (int i = 1; i <= 20; i++)
            {
                colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/ColorTex/BuildingTexture" + i + "_COLOR.png");
                normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/NormalTex/BuildingTexture" + i + "_NRM.png");
                specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/SpecularTex/BuildingTexture" + i + "_SPEC.png");
            }

            for (int k = 0; k < skinNames.Count; k++)
            {
                BuildingMaterial mat = new BuildingMaterial();
                mat.name                = skinNames[k];
                mat.width               = skinSizes[k];
                mat.colorTexturePath    = colorTexturePath[k];
                mat.normalTexturePath   = normalTexturePath[k];
                mat.specularTexturePath = specularTexturePath[k];
                mat.isActive            = true;

                config.buildingConfig.defaultSkins.Add(mat);
            }

            config.buildingConfig.defaultSkins[5].isActive = false;
            config.buildingConfig.defaultSkins[6].isActive = false;

            return(config);
        }
        private void configLoadHelper(InitialConfigurations config)
        {
            var children = new List<GameObject>();
            var parentTransform = buildingMenu.transform.Find("Panel").Find("ScrollRect").Find("Content Panel");
            foreach (Transform child in parentTransform) children.Add(child.gameObject);
            children.ForEach(child => Destroy(child));

            materialList = config.buildingConfig.defaultSkins;

            InputField min = buildingMenu.transform.Find("Panel").Find("HeightComponent").Find("InputField_Min").GetComponent<InputField>();
            min.text = config.buildingConfig.minheight.ToString();

            InputField max = buildingMenu.transform.Find("Panel").Find("HeightComponent").Find("InputField_Max").GetComponent<InputField>();
            max.text = config.buildingConfig.maxheight.ToString();

            GameObject skinList = buildingMenu.transform.Find("Panel").Find("ScrollRect").Find("Content Panel").gameObject;

            for (int k = 0; k < config.buildingConfig.defaultSkins.Count; k++)
            {

                GameObject skinItem = (GameObject)MonoBehaviour.Instantiate(Resources.Load("Prefabs/Menu/BuildingSkin"));

                Toggle skinitemToggle = skinItem.transform.Find("Panel").Find("Toggle").gameObject.GetComponent<Toggle>();
                skinitemToggle.isOn = config.buildingConfig.defaultSkins[k].isActive;

                Text skinitemName = skinItem.transform.Find("Panel").Find("Text_Type").gameObject.GetComponent<Text>();
                skinitemName.text = config.buildingConfig.defaultSkins[k].name;

                Text skinitemSize = skinItem.transform.Find("Panel").Find("Text_Size").GetComponent<Text>();
                skinitemSize.text = config.buildingConfig.defaultSkins[k].width.ToString();

                byte[] fileData;

                RawImage skinitemColor = skinItem.transform.Find("Panel").Find("Image_ColorTexture").GetComponent<RawImage>();
                Texture2D colorText;
                if (File.Exists(config.buildingConfig.defaultSkins[k].colorTexturePath))
                {
                    fileData = File.ReadAllBytes(config.buildingConfig.defaultSkins[k].colorTexturePath);
                    colorText = new Texture2D(2, 2);
                    colorText.LoadImage(fileData);
                    skinitemColor.texture = colorText;
                }
                else
                    skinitemColor.texture = null;

                RawImage skinitemNormal = skinItem.transform.Find("Panel").Find("Image_NormalTexture").GetComponent<RawImage>();
                Texture2D normalText;
                if (File.Exists(config.buildingConfig.defaultSkins[k].normalTexturePath))
                {
                    fileData = File.ReadAllBytes(config.buildingConfig.defaultSkins[k].normalTexturePath);
                    normalText = new Texture2D(2, 2);
                    normalText.LoadImage(fileData);
                    skinitemNormal.texture = normalText;
                }
                else
                    skinitemNormal.texture = null;

                RawImage skinitemSpecular = skinItem.transform.Find("Panel").Find("Image_SpecularTexture").GetComponent<RawImage>();
                Texture2D specularText;
                if (File.Exists(config.buildingConfig.defaultSkins[k].specularTexturePath))
                {
                    fileData = File.ReadAllBytes(config.buildingConfig.defaultSkins[k].specularTexturePath);
                    specularText = new Texture2D(2, 2);
                    specularText.LoadImage(fileData);
                    skinitemSpecular.texture = specularText;
                }
                else
                    skinitemSpecular.texture = null;

                skinItem.transform.SetParent(skinList.transform);
            }
        }
        public void saveInitialConfig(string path, InitialConfigurations config)
        {
            var serializer = new XmlSerializer(typeof(InitialConfigurations));
            var encoding = Encoding.GetEncoding("UTF-8");

            if (File.Exists(path))
                File.Delete(path);

            using (var stream = new StreamWriter(path, false, encoding))//new FileStream(path, FileMode.Create))
            {
                serializer.Serialize(stream, config);
            }
        }
        public InitialConfigurations fillConfig()
        {
            InitialConfigurations config = new InitialConfigurations();

            //HIGHWAY CONFIGURATIONS
            config.highwayConfig = new List<HighwayConfigurations>();
            string[] highwayTypes = new string[] {"HighwayResidential", "HighwayPrimary", "HighwaySecondary", "HighwayTertiary","HighwayTertiaryLink",
                                                  "HighwayUnclassified", "HighwayService", "HighwayPath", "HighwayFootway",
                                                  "HighwayPavement", "Railway", "River"};
            float[] highwaySizes = new float[] {6.0f, 10.0f, 10.0f, 8.0f, 8.0f, 7.0f, 4.0f, 6.0f, 4.0f, 2.0f, 1.5f, 8.0f };

            string[] highwayMaterials = new string[] {"Materials/Highway/Mat_Residential", "Materials/Highway/Mat_Primary",
            "Materials/Highway/Mat_Secondary","Materials/Highway/Mat_Tertiary", "Materials/Highway/Mat_TertiaryLink", "Materials/Highway/Mat_Unclassified",
            "Materials/Highway/Mat_Service", "Materials/Highway/Mat_Path", "Materials/Highway/Mat_Footway",
            "Materials/Highway/Mat_Pavement", "Materials/Highway/Mat_Railway","Materials/Highway/Mat_River" };

            for(int k=0 ; k < highwayTypes.Length ; k++)
            {
                HighwayConfigurations hc = new HighwayConfigurations();
                hc.size = highwaySizes[k];
                hc.type = highwayTypes[k];
                hc.materialPath = highwayMaterials[k];
                config.highwayConfig.Add(hc);
            }

            //RIVER CONFIGURATIONS [NOT USED]
            config.riverConfig = new RiverConfigurations();
            config.riverConfig.materialPath = "Materials/River/??";
            config.riverConfig.size = 6.0f;

            //AREA CONFIGURATIONS [NOT USED]
            config.areaConfig = new AreaConfigurations();
            config.areaConfig.defaultColor = new Vector3(0.3f, 0.3f, 0.3f);

            //BARRIER CONFIGURATIONS
            config.barrierConfig = new List<BarrierConfigurations>();

            float[] barrierHeight = new float[] {2.0f,1.5f,15.0f,3.0f, 2.0f };
            float[] barrierWidth = new float[] { 0.1f,0.3f,3.0f,0.3f, 0.5f };
            string[] barrierTypes = new string[]{"Fence", "Wall", "City Wall", "Retaining Wall", "Default"};
            string[] barrierPrefabs = new string[]{"Materials/Barrier/chainlink", "Materials/Barrier/BrickWall",
                                                   "Materials/Barrier/CityWall", "Materials/Barrier/RetainingWall",
                                                   "Materials/Barrier/Default"};
            for (int k = 0; k < barrierTypes.Length; k++)
            {
                BarrierConfigurations bar = new BarrierConfigurations();
                bar.width = barrierWidth[k];
                bar.height = barrierHeight[k];
                bar.Path = barrierPrefabs[k];
                bar.name = barrierTypes[k];
                config.barrierConfig.Add(bar);
            }

            //BUILDING CONFIGURATIONS
            config.buildingConfig = new BuildingConfigurations();
            config.buildingConfig.defaultColor = new Vector3(0.5f, 0.5f, 0.5f);
            config.buildingConfig.minheight = 14.0f;
            config.buildingConfig.maxheight = 18.0f;
            config.buildingConfig.defaultSkins = new List<BuildingMaterial>();

            List<string> skinNames = new List<string>();
            skinNames.Add("White Concrete");
            skinNames.Add("Dark Brick");
            skinNames.Add("Light Brick");
            skinNames.Add("White Concrete 2");
            skinNames.Add("Dark Brick 2");
            skinNames.Add("Antic Stones");
            skinNames.Add("Kiosk");
            //---------------------
            skinNames.Add("White Historic");
            skinNames.Add("Yellow-Orrange Concrete");
            skinNames.Add("Wide Historic");
            skinNames.Add("Old Concrete 2-floor");
            skinNames.Add("Old Stone");
            skinNames.Add("White Stone");
            skinNames.Add("White Concrete 3");
            skinNames.Add("Brick");
            skinNames.Add("Old Concrete with Shop");
            skinNames.Add("Brick 2");
            skinNames.Add("Old Concrete");
            skinNames.Add("Yellow Historic");
            skinNames.Add("Yellow Concrete with Shop");
            skinNames.Add("Brown-White Concrete");
            skinNames.Add("Orange Wide");
            skinNames.Add("White Stone 2");
            skinNames.Add("White Stone Modern");
            skinNames.Add("White Concrete Modern");
            skinNames.Add("Office Type");
            skinNames.Add("White Concrete 4");

            float[] skinSizes = new float[] { 16.0f, 16.0f, 12.0f, 8.0f, 8.0f,30.0f,2.0f, 12.0f, 20.0f, 24.0f, 8.0f, 16.0f, 8.0f, 8.0f, 8.0f, 12.0f, 16.0f, 16.0f, 16.0f, 12.0f, 16.0f, 24.0f, 12.0f, 16.0f, 20.0f, 16.0f, 16.0f };

            //float[] skinSizes = new float[] {16.0f,16.0f,12.0f,8.0f,8.0f,30.0f,2.0f};
            List<string> colorTexturePath = new List<string>();
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture1.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture2.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture3.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture4.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/buildingTexture5.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/towerTexture.jpg");
            colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/KioskTexture.jpg");

            List<string> normalTexturePath = new List<string>();
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building1Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building2Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building3Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building4Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building5Normal.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/NormalMapTower.png");
            normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/NormalMapKiosk.png");

            List<string> specularTexturePath = new List<string>();
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building1Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building2Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building3Specular.png");
            specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Building/Building4Specular.png");
            specularTexturePath.Add("");
            specularTexturePath.Add("");
            specularTexturePath.Add("");

            for (int i = 1; i <= 20; i++)
            {
                colorTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/ColorTex/BuildingTexture" + i + "_COLOR.png");
                normalTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/NormalTex/BuildingTexture" + i + "_NRM.png");
                specularTexturePath.Add(Application.dataPath + "/Resources/Textures/Buildings/SpecularTex/BuildingTexture" + i + "_SPEC.png");
            }

            for (int k = 0; k < skinNames.Count; k++)
            {
                BuildingMaterial mat = new BuildingMaterial();
                mat.name = skinNames[k];
                mat.width = skinSizes[k];
                mat.colorTexturePath = colorTexturePath[k];
                mat.normalTexturePath = normalTexturePath[k];
                mat.specularTexturePath = specularTexturePath[k];
                mat.isActive = true;

                config.buildingConfig.defaultSkins.Add(mat);
            }

            config.buildingConfig.defaultSkins[5].isActive = false;
            config.buildingConfig.defaultSkins[6].isActive = false;

            return config;
        }