public void UpdatePlayerInfo() { string filePath = Application.persistentDataPath + "/Player.xml"; if (File.Exists(filePath)) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(filePath); XmlNodeList playerNodeList = xmlDoc.SelectSingleNode("Player").ChildNodes; //遍历Player结点下所有子节点 foreach (XmlElement xe in playerNodeList) { switch (xe.Name) { case "LevelLayer": xe.InnerText = LayerCount.ToString(); break; case "Hp": xe.InnerText = Hp.ToString(); break; case "ShootLevel": xe.InnerText = ShootLevel.ToString(); break; case "SpeedLevel": xe.InnerText = SpeedLevel.ToString(); break; case "BulletLevel": xe.InnerText = BulletLevel.ToString(); break; case "LightLevel": xe.InnerText = BulletLevel.ToString(); break; case "Speed": xe.InnerText = Speed.ToString(); break; case "ShootTimer": xe.InnerText = ShootTimer.ToString(); break; case "Money": xe.InnerText = Money.ToString(); break; case "SkillIcon": xe.InnerText = skillIcon.ToString(); break; } } xmlDoc.Save(filePath); } }
public string[] ToList() { string[] properties = new string[4]; properties[0] = $"Name: {Name}"; properties[1] = $"Layer Count: {LayerCount.ToString()}"; properties[2] = $"Object Count: {ObjectCount.ToString()}"; properties[3] = $"Blockdefinition Count: {BlockDefinitionCount.ToString()}"; return(properties); }
public void SavePlayerInfo() { string filePath = Application.persistentDataPath + "/Player.xml"; if (!File.Exists(filePath)) { XmlDocument xmlDoc = new XmlDocument(); //头结点 XmlElement root = xmlDoc.CreateElement("Player"); XmlElement locallayer = xmlDoc.CreateElement("LevelLayer"); locallayer.InnerText = LayerCount.ToString(); XmlElement localHp = xmlDoc.CreateElement("Hp"); localHp.InnerText = Hp.ToString(); XmlElement localShootLevel = xmlDoc.CreateElement("ShootLevel"); localShootLevel.InnerText = ShootLevel.ToString(); XmlElement localSpeedLevel = xmlDoc.CreateElement("SpeedLevel"); localSpeedLevel.InnerText = SpeedLevel.ToString(); XmlElement localBulletLevel = xmlDoc.CreateElement("BulletLevel"); localBulletLevel.InnerText = BulletLevel.ToString(); XmlElement localLightlevel = xmlDoc.CreateElement("LightLevel"); localLightlevel.InnerText = LightLevel.ToString(); XmlElement localSpeed = xmlDoc.CreateElement("Speed"); localSpeed.InnerText = Speed.ToString(); XmlElement localShootTimer = xmlDoc.CreateElement("ShootTimer"); localShootTimer.InnerText = ShootTimer.ToString(); XmlElement localMoney = xmlDoc.CreateElement("Money"); localMoney.InnerText = Money.ToString(); XmlElement localSkillIcon = xmlDoc.CreateElement("SkillICon"); localSkillIcon.InnerText = skillIcon.ToString(); root.AppendChild(locallayer); root.AppendChild(localHp); root.AppendChild(localShootLevel); root.AppendChild(localSpeedLevel); root.AppendChild(localBulletLevel); root.AppendChild(localLightlevel); root.AppendChild(localSpeed); root.AppendChild(localShootTimer); root.AppendChild(localMoney); root.AppendChild(localSkillIcon); xmlDoc.AppendChild(root); xmlDoc.Save(filePath); } }
public void Save(string FilePath) { if (string.IsNullOrEmpty(FilePath)) { throw new ArgumentNullException("FilePath"); } var writer = XmlWriter.Create(FilePath); writer.WriteStartElement("NeuralNetwork"); writer.WriteAttributeString("Type", "BackPropagation"); // Parameters element writer.WriteStartElement("Parameters"); writer.WriteElementString("Name", Name); writer.WriteElementString("InputSize", InputSize.ToString()); writer.WriteElementString("LayerCount", LayerCount.ToString()); // Layer sizes writer.WriteStartElement("Layers"); for (int l = 0; l < LayerCount; l++) { writer.WriteStartElement("Layer"); writer.WriteAttributeString("Index", l.ToString()); writer.WriteAttributeString("Size", LayerSize[l].ToString()); writer.WriteAttributeString("Type", TransferFunctions[l].ToString()); writer.WriteEndElement(); // Layer } writer.WriteEndElement(); // Layers writer.WriteEndElement(); // Parameters writer.WriteStartElement("Weights"); for (int l = 0; l < LayerCount; l++) { writer.WriteStartElement("Layer"); writer.WriteAttributeString("Index", l.ToString()); for (int j = 0; j < LayerSize[l]; j++) { writer.WriteStartElement("Node"); writer.WriteAttributeString("Index", j.ToString()); writer.WriteAttributeString("Bias", Bias[l][j].ToString()); for (int i = 0; i < (l == 0 ? InputSize : LayerSize[l - 1]); i++) { writer.WriteStartElement("Axon"); writer.WriteAttributeString("Index", i.ToString()); writer.WriteString(Weight[l][i][j].ToString()); writer.WriteEndElement(); // Axon } writer.WriteEndElement(); // Node } writer.WriteEndElement(); // Layer } writer.WriteEndElement(); // Weights writer.WriteEndElement(); // NeuralNetwork writer.Flush(); writer.Close(); }
public void UpdateHorizonMaster () { if (updateHorizonMaster){ if (getFromMaterialMat != null){ hMats.Clear(); hMats.Add(getFromMaterialMat); } foreach (Material m in hMats){ if (m != null){ // Features ===================================================================================================================== bool getFeaturesOld = getFeatures; if (getFromMaterialMat != null){ getFeatures = true; } if (getFeatures){ if (m.HasProperty ("_LayerCount")){ if (m.GetFloat ("_LayerCount") == 0) {hFeatLayerCount = LayerCount.One; layerCount = 1; } if (m.GetFloat ("_LayerCount") == 1) {hFeatLayerCount = LayerCount.Two; layerCount = 2; } if (m.GetFloat ("_LayerCount") == 2) {hFeatLayerCount = LayerCount.Three; layerCount = 3; } if (m.GetFloat ("_LayerCount") == 3) {hFeatLayerCount = LayerCount.Four; layerCount = 4; } } if (m.HasProperty ("_IBLDiff")){ if (m.GetFloat ("_IBLDiff") == 0) hFeatDiffLightMode = DiffLightMode.Ambient; if (m.GetFloat ("_IBLDiff") == 1) hFeatDiffLightMode = DiffLightMode.CubeM; if (m.GetFloat ("_IBLDiff") == 2) hFeatDiffLightMode = DiffLightMode.SkyshopSH; if (m.GetFloat ("_IBLDiff") == 3) hFeatDiffLightMode = DiffLightMode.Unity5SH; } if (m.HasProperty ("_Normalmaps")){ if (m.GetFloat ("_Normalmaps") == 1) hFeatNormalmaps = true; else hFeatNormalmaps = false; } if (m.HasProperty ("_Emissiveness")){ if (m.GetFloat ("_Emissiveness") == 1) hFeatEmissivness = true; else hFeatEmissivness = false; } if (m.HasProperty ("_Detail")){ if (m.GetFloat ("_Detail") == 1) hFeatDetailTex = true; else hFeatDetailTex = false; } if (m.HasProperty ("_Water")){ if (m.GetFloat ("_Water") == 1) hFeatWater = true; else hFeatWater = false; } if (m.HasProperty ("_OverlayFog")){ if (m.GetFloat ("_OverlayFog") == 1) hFeatFog = true; else hFeatFog = false; } if (m.HasProperty ("_Snow")){ if (m.GetFloat ("_Snow") == 1) hFeatSnow = true; else hFeatSnow = false; } if (m.HasProperty ("_DirectSpec")){ if (m.GetFloat ("_DirectSpec") ==1 ) hFeatDirSpec = true; else hFeatDirSpec = false; } if (m.HasProperty ("_IBLSpec")){ if (m.GetFloat ("_IBLSpec") == 1) hFeatCubeRefl = true; else hFeatCubeRefl = false; } } getFeatures = getFeaturesOld; // Settings ===================================================================================================================== bool getMatSettingsOld = getMatSettings; if (getFromMaterialMat != null){ getMatSettings = true; } if (getMatSettings){ // Disc Scaling ===================================================================================================================== if (m.HasProperty ("_ScaleInner")) { hSetScaleInner = m.GetFloat ("_ScaleInner")/1.25f; } if (m.HasProperty ("_ScaleOuter")) { hSetScaleOuter = m.GetFloat ("_ScaleOuter"); } if (m.HasProperty ("_ScaleHeight")) { hSetScaleHeight = m.GetFloat ("_ScaleHeight"); } // Main Settings ===================================================================================================================== if (m.HasProperty ("_MapScaleOffset")) { hSetMaskScaleOffset = m.GetVector ("_MapScaleOffset"); } if (m.HasProperty ("_MaskRBlend1GBlend2BBlend3AWater")) { hTexMask = m.GetTexture ("_MaskRBlend1GBlend2BBlend3AWater"); } if (m.HasProperty ("_LocalSpace")) { if (m.GetFloat ("_LocalSpace") == 1) hSetLockMask = true; else hSetLockMask = false; } if (m.HasProperty ("_Tint")) { hColTint = m.GetColor ("_Tint"); } if (m.HasProperty ("_EmissionColor")) { hColEmissColor = m.GetColor ("_EmissionColor"); } if (m.HasProperty ("_AmbientOverrideAAmount")) { hColAmbOverride = m.GetColor ("_AmbientOverrideAAmount"); } if (m.HasProperty ("_AmbientIBL")) { hSetAmbvsIBL = m.GetFloat ("_AmbientIBL"); } if (m.HasProperty ("_GlobalNormalmapIntensity")) { hSetNMIntensLayers = m.GetFloat ("_GlobalNormalmapIntensity"); } // Layer Settings ================================================================================================================================================== // Layer 1 Settings if (m.HasProperty ("_BaseColormap")) { hSetLayerProps[0].hTexLayerDiff = m.GetTexture ("_BaseColormap"); } if (m.HasProperty ("_BaseColormap")) { hSetLayerProps[0].hSetLayerScaleOffset = new Vector4 (m.GetTextureScale ("_BaseColormap").x, m.GetTextureScale ("_BaseColormap").y, m.GetTextureOffset ("_BaseColormap").x, m.GetTextureOffset ("_BaseColormap").y); } if (m.HasProperty ("_TintSaturation")) { hSetLayerProps[0].hColLayerTint = m.GetColor ("_TintSaturation"); } if (m.HasProperty ("_BaseGloss")) { if (m.GetFloat ("_BaseGloss") == 1) hSetLayerProps[0].hSetAIsGlossMask = true; else hSetLayerProps[0].hSetAIsGlossMask = false; } if (m.HasProperty ("_BaseEmission")) { if (m.GetFloat ("_BaseEmission") == 1) hSetLayerProps[0].hSetAIsEmissMask = true; else hSetLayerProps[0].hSetAIsEmissMask = false; } if (m.HasProperty ("_BaseNormalmap")) { hSetLayerProps[0].hTexLayerNM = m.GetTexture ("_BaseNormalmap"); } if (m.HasProperty ("_SpecGloss")) { hSetLayerProps[0].hColLayerSpecGloss = m.GetColor ("_SpecGloss"); } if (m.HasProperty ("_BaseDetailIntensity")) { hSetLayerProps[0].hSetLayerDetIntens = m.GetFloat ("_BaseDetailIntensity"); } // Layer 2 Settings if (m.HasProperty ("_BlendColorMap1")) { hSetLayerProps[1].hTexLayerDiff = m.GetTexture ("_BlendColorMap1"); } if (m.HasProperty ("_BlendColorMap1")) { hSetLayerProps[1].hSetLayerScaleOffset = new Vector4 (m.GetTextureScale ("_BlendColorMap1").x, m.GetTextureScale ("_BlendColorMap1").y, m.GetTextureOffset ("_BlendColorMap1").x, m.GetTextureOffset ("_BlendColorMap1").y); } if (m.HasProperty ("_TintSaturationBlend1")) { hSetLayerProps[1].hColLayerTint = m.GetColor ("_TintSaturationBlend1"); } if (m.HasProperty ("_BlendGloss1")) { if (m.GetFloat ("_BlendGloss1") == 1) hSetLayerProps[1].hSetAIsGlossMask = true; else hSetLayerProps[1].hSetAIsGlossMask = false; } if (m.HasProperty ("_BlendEmission1")) { if (m.GetFloat ("_BlendEmission1") == 1) hSetLayerProps[1].hSetAIsEmissMask = true; else hSetLayerProps[1].hSetAIsEmissMask = false; } if (m.HasProperty ("_BlendNormalmap1")) { hSetLayerProps[1].hTexLayerNM = m.GetTexture ("_BlendNormalmap1"); } if (m.HasProperty ("_SpecGlossBlend1")) { hSetLayerProps[1].hColLayerSpecGloss = m.GetColor ("_SpecGlossBlend1"); } if (m.HasProperty ("_BlendDetailIntensity1")) { hSetLayerProps[1].hSetLayerDetIntens = m.GetFloat ("_BlendDetailIntensity1"); } // Layer 3 Settings if (m.HasProperty ("_BlendColormap2")) { hSetLayerProps[2].hTexLayerDiff = m.GetTexture ("_BlendColormap2"); } if (m.HasProperty ("_BlendColormap2")) { hSetLayerProps[2].hSetLayerScaleOffset = new Vector4 (m.GetTextureScale ("_BlendColormap2").x, m.GetTextureScale ("_BlendColormap2").y, m.GetTextureOffset ("_BlendColormap2").x, m.GetTextureOffset ("_BlendColormap2").y); } if (m.HasProperty ("_TintSaturationBlend2")) { hSetLayerProps[2].hColLayerTint = m.GetColor ("_TintSaturationBlend2"); } if (m.HasProperty ("_BlendGloss2")) { if (m.GetFloat ("_BlendGloss2") == 1) hSetLayerProps[2].hSetAIsGlossMask = true; else hSetLayerProps[2].hSetAIsGlossMask = false; } if (m.HasProperty ("_BlendEmission2")) { if (m.GetFloat ("_BlendEmission2") == 1) hSetLayerProps[2].hSetAIsEmissMask = true; else hSetLayerProps[2].hSetAIsEmissMask = false; } if (m.HasProperty ("_BlendNormalmap2")) { hSetLayerProps[2].hTexLayerNM = m.GetTexture ("_BlendNormalmap2"); } if (m.HasProperty ("_SpecGlossBlend2")) { hSetLayerProps[2].hColLayerSpecGloss = m.GetColor ("_SpecGlossBlend2"); } if (m.HasProperty ("_BlendDetailIntensity2")) { hSetLayerProps[2].hSetLayerDetIntens = m.GetFloat ("_BlendDetailIntensity2"); } // Layer 4 Settings if (m.HasProperty ("_BlendColormap3")) { hSetLayerProps[3].hTexLayerDiff = m.GetTexture ("_BlendColormap3"); } if (m.HasProperty ("_BlendColormap3")) { hSetLayerProps[3].hSetLayerScaleOffset = new Vector4 (m.GetTextureScale ("_BlendColormap3").x, m.GetTextureScale ("_BlendColormap3").y, m.GetTextureOffset ("_BlendColormap3").x, m.GetTextureOffset ("_BlendColormap3").y); } if (m.HasProperty ("_TintSaturationBlend3")) { hSetLayerProps[3].hColLayerTint = m.GetColor ("_TintSaturationBlend3"); } if (m.HasProperty ("_BlendGloss3")) { if (m.GetFloat ("_BlendGloss3") == 1) hSetLayerProps[3].hSetAIsGlossMask = true; else hSetLayerProps[3].hSetAIsGlossMask = false; } if (m.HasProperty ("_BlendEmission3")) { if (m.GetFloat ("_BlendEmission3") == 1) hSetLayerProps[3].hSetAIsEmissMask = true; else hSetLayerProps[3].hSetAIsEmissMask = false; } if (m.HasProperty ("_BlendNormalmap3")) { hSetLayerProps[3].hTexLayerNM = m.GetTexture ("_BlendNormalmap3"); } if (m.HasProperty ("_SpecGlossBlend3")) { hSetLayerProps[3].hColLayerSpecGloss = m.GetColor ("_SpecGlossBlend3"); } if (m.HasProperty ("_BlendDetailIntensity3")) { hSetLayerProps[3].hSetLayerDetIntens = m.GetFloat ("_BlendDetailIntensity3"); } // Detail Settings ============================================================================================================================= if (m.HasProperty ("_DetailColormap")) { hTexDetailTexDiff = m.GetTexture ("_DetailColormap"); } if (m.HasProperty ("_DetailColormap")) { hSetDetailScaleOffset = new Vector4 (m.GetTextureScale ("_DetailColormap").x, m.GetTextureScale ("_DetailColormap").y, m.GetTextureOffset ("_DetailColormap").x, m.GetTextureOffset ("_DetailColormap").y); } if (m.HasProperty ("_DetailColormapIntensity")) { hSetDetailDiffIntens = m.GetFloat ("_DetailColormapIntensity"); } if (m.HasProperty ("_DetailNormalmap")) { hTexDetailTexNM = m.GetTexture ("_DetailNormalmap"); } if (m.HasProperty ("_DetailNormalmapIntensity")) { hSetDetailNMIntens = m.GetFloat ("_DetailNormalmapIntensity"); } // Water Settings ============================================================================================================================= if (m.HasProperty ("_WaterColorAColorBlend")) { hColWaterColorOpac = m.GetColor ("_WaterColorAColorBlend"); } if (m.HasProperty ("_WaterSpecGloss")) { hColWaterSpecGloss = m.GetColor ("_WaterSpecGloss"); } if (m.HasProperty ("_WaterNormalmap")) { hTexWaterNM = m.GetTexture ("_WaterNormalmap"); } if (m.HasProperty ("_WaterNormalmap")) { hSetWaterScaleOffset = new Vector4 (m.GetTextureScale ("_WaterNormalmap").x ,m.GetTextureScale ("_WaterNormalmap").y, m.GetTextureOffset ("_WaterNormalmap").x ,m.GetTextureOffset ("_WaterNormalmap").y); } if (m.HasProperty ("_WaterBlend")) { hSetWaterBlend = m.GetFloat ("_WaterBlend"); } if (m.HasProperty ("_WaterWaves")) { hSetWaterWavesIntens = m.GetFloat ("_WaterWaves"); } if (m.HasProperty ("_WaterWaveSpeed")) { HSetWaterWavesSpeed = m.GetFloat ("_WaterWaveSpeed"); } // Fog Settings ============================================================================================================================= if (m.HasProperty ("_OverlayFogAmount")) { hSetFogIntens = m.GetFloat ("_OverlayFogAmount"); } if (m.HasProperty ("_OverlayFogColorAfromAmbient")) { hColFogColorAmbBlend = m.GetColor ("_OverlayFogColorAfromAmbient"); } if (m.HasProperty ("_OverlayFogAmountFromReflCubemap")) { hSetFogSpecCubeAdd = m.GetFloat ("_OverlayFogAmountFromReflCubemap"); } if (m.HasProperty ("_OverlayFogStartDistance")) { hSetFogStartDist = m.GetFloat ("_OverlayFogStartDistance"); } if (m.HasProperty ("_OverlayFogDistanceTransition")) { hSetFogTransDist = m.GetFloat ("_OverlayFogDistanceTransition"); } if (m.HasProperty ("_OverlayFogStartHeight")) { hSetFogStartHeight = m.GetFloat ("_OverlayFogStartHeight"); } if (m.HasProperty ("_OverlayFogHeightTransition")) { hSetFogTransHeight = m.GetFloat ("_OverlayFogHeightTransition"); } if (m.HasProperty ("_OverlayFogDistance2Height")) { hSetFogDistHeightOffset = m.GetFloat ("_OverlayFogDistance2Height"); } if (m.HasProperty ("_OverlayFogEmissivePunchThru")) { hSetFogEmissPunchThru = m.GetFloat ("_OverlayFogEmissivePunchThru"); } // IBL Settings ============================================================================================================================= if (m.HasProperty ("_DiffuseIBLCubemap")) { hCubeIBLDiff = (Cubemap)m.GetTexture("_DiffuseIBLCubemap"); } if (m.HasProperty ("_DiffIBLMulti")) { hSetIBLExposure = m.GetFloat ("_DiffIBLMulti"); } if (m.HasProperty ("unity_SpecCube0")) { hCubeIBLSpec = (Cubemap)m.GetTexture ("unity_SpecCube0"); } if (m.HasProperty ("_IBLSpecRoughMIP")) { hSetSpecRoughMIPLevel = m.GetFloat ("_IBLSpecRoughMIP"); } if (m.HasProperty ("_IBLMIPDim_Rough")) { hSetSpecRoughMulti = m.GetFloat ("_IBLMIPDim_Rough"); } if (m.HasProperty ("_IBLSpecGlossMIP")) { hSetSpecGlossMIPLevel = m.GetFloat ("_IBLSpecGlossMIP"); } if (m.HasProperty ("_IBLMIPDim_Gloss")) { hSetSpecGlossMulti = m.GetFloat ("_IBLMIPDim_Gloss"); } // Snow Settings ============================================================================================================================= if (m.HasProperty ("_SnowAmount")) { hsetSnowAmount = m.GetFloat ("_SnowAmount"); } if (m.HasProperty ("_SnowColor")) { hColSnowDiffColor = m.GetColor ("_SnowColor"); } if (m.HasProperty ("_SnowSpecGloss")) { hColSnowSpecGloss = m.GetColor ("_SnowSpecGloss"); } if (m.HasProperty ("_SnowHeight")) { hSetSnowStartHeight = m.GetFloat ("_SnowHeight"); } if (m.HasProperty ("_SnowHeightTransition")) { hSetSnowHeightTrans = m.GetFloat ("_SnowHeightTransition"); } if (m.HasProperty ("_SnowSlopeDamp")) { hSetSnowSlopeDamp = m.GetFloat ("_SnowSlopeDamp")/4; } if (m.HasProperty ("_SnowOutputColorBrightness2Coverage")) { hSetSnowReduceByColor = m.GetFloat ("_SnowOutputColorBrightness2Coverage"); } // Displacement Settings ============================================================================================================================= if (m.HasProperty ("_Parallax")) { hSetDispHeight = m.GetFloat ("_Parallax"); } if (m.HasProperty ("_ReduceByVertexAlpha")) {if (m.GetFloat ("_ReduceByVertexAlpha") == 1) hSetDispRedByVertCol = true; else hSetDispRedByVertCol = false; } if (m.HasProperty ("_ReduceByUVBorder")) { if (m.GetFloat ("_ReduceByUVBorder") == 1) hSetDispRedByUV = true; else hSetDispRedByUV = false; } if (m.HasProperty ("_ReduceByUVBorderLength")) { hSetDispRedFadeAmount = (1-(m.GetFloat ("_ReduceByUVBorderLength"))); } if (m.HasProperty ("_ParallaxMap")) { hTexDispHeightmap = m.GetTexture ("_ParallaxMap"); } if (m.HasProperty ("_EdgeLength")) { hSetTessSubD = m.GetFloat ("_EdgeLength"); } // Cliff Settings ============================================================================================================================= if (m.HasProperty ("_CliffColormap")) { hTexCliffDiff = m.GetTexture ("_CliffColormap"); } if (m.HasProperty ("_CliffColormap")) { hSetCliffScaleOffset = new Vector4 (m.GetTextureScale ("_CliffColormap").x, m.GetTextureScale ("_CliffColormap").y, m.GetTextureOffset ("_CliffColormap").x, m.GetTextureOffset ("_CliffColormap").y); } if (m.HasProperty ("_CliffGloss")) {if (m.GetFloat ("_CliffGloss") == 1) hSetCliffAIsGlossMask = true; else hSetCliffAIsGlossMask = false; } if (m.HasProperty ("_CliffEmission")) { if (m.GetFloat ("_CliffEmission" ) == 1) hSetCliffAIsEmissMask = true; else hSetCliffAIsEmissMask = false; } if (m.HasProperty ("_SpecGlossCliff")) { hColCliffSpecGloss = m.GetColor ("_SpecGlossCliff"); } if (m.HasProperty ("_CliffNormalmap")) { hTexCliffNM = m.GetTexture ("_CliffNormalmap"); } if (m.HasProperty ("_CliffDetail")) { if (m.GetFloat ("_CliffDetail") == 0) hSetCliffDetailMode = HSetCliffDetailMode.None; else if (m.GetFloat ("_CliffDetail") == 1) hSetCliffDetailMode = HSetCliffDetailMode.Color; else hSetCliffDetailMode = HSetCliffDetailMode.Normal; } if (m.HasProperty ("_CliffDetailmap")) { hTexCliffDetDiff = m.GetTexture ("_CliffDetailmap"); } if (m.HasProperty ("_CliffDetailmap")) { hSetCliffDetScaleOffset = new Vector4 (m.GetTextureScale ("_CliffDetailmap").x, m.GetTextureScale ("_CliffDetailmap").y, m.GetTextureOffset ("_CliffDetailmap").x, m.GetTextureOffset ("_CliffDetailmap").y); } if (m.HasProperty ("_CliffDetailColorIntensity")) { hSetCliffDetDiffIntens = m.GetFloat ("_CliffDetailColorIntensity"); } if (m.HasProperty ("_CliffDetailNormalmap")) { hTexCliffDetNM = m.GetTexture ("_CliffDetailNormalmap"); } if (m.HasProperty ("_CliffDetailNormalIntensity")) { hSetCliffDetNMIntens = m.GetFloat ("_CliffDetailNormalIntensity"); } } getMatSettings = getMatSettingsOld; } } } }