public void PopulatePreset(HEU_VolumeCachePreset cachePreset) { cachePreset._objName = ObjectName; cachePreset._geoName = GeoName; cachePreset._uiExpanded = UIExpanded; cachePreset._tile = TileIndex; if (_terrainData != null) { cachePreset._terrainDataPath = HEU_AssetDatabase.GetAssetPath(_terrainData); } else { cachePreset._terrainDataPath = ""; } //Debug.Log("Set terraindata path: " + cachePreset._terrainDataPath); foreach (HEU_VolumeLayer layer in _layers) { HEU_VolumeLayerPreset layerPreset = new HEU_VolumeLayerPreset(); layerPreset._layerName = layer._layerName; layerPreset._strength = layer._strength; layerPreset._uiExpanded = layer._uiExpanded; layerPreset._tile = layer._tile; cachePreset._volumeLayersPresets.Add(layerPreset); } }
public void PopulatePreset(HEU_VolumeCachePreset cachePreset) { cachePreset._objName = ObjectName; cachePreset._geoName = GeoName; cachePreset._uiExpanded = UIExpanded; foreach (HEU_VolumeLayer layer in _layers) { HEU_VolumeLayerPreset layerPreset = new HEU_VolumeLayerPreset(); layerPreset._layerName = layer._layerName; layerPreset._strength = layer._strength; if(layer._splatTexture != null) { layerPreset._splatTexturePath = HEU_AssetDatabase.GetAssetPath(layer._splatTexture); } if (layer._normalTexture != null) { layerPreset._normalTexturePath = HEU_AssetDatabase.GetAssetPath(layer._normalTexture); } layerPreset._tileSize = layer._tileSize; layerPreset._tileOffset = layer._tileOffset; layerPreset._metallic = layer._metallic; layerPreset._smoothness = layer._smoothness; layerPreset._uiExpanded = layer._uiExpanded; cachePreset._volumeLayersPresets.Add(layerPreset); } }