public static BuildingInfo SetTextures(this BuildingInfo info, TextureSet newTextures, LODTextureSet newLODTextures = null) { if (newTextures != null) { if (info.m_material != null) { info.m_material = newTextures.CreateRoadMaterial(info.m_material); } } if (newLODTextures != null) { if (info.m_lodMaterial != null) { info.m_lodMaterial = newLODTextures.CreateRoadMaterial(info.m_lodMaterial); } } return(info); }
public static NetInfo SetAllNodesTexture(this NetInfo info, TextureSet newTextures, LODTextureSet newLODTextures = null) { foreach (var node in info.m_nodes) { node.SetTextures(newTextures, newLODTextures); } return(info); }
public static NetInfo.Node SetTextures(this NetInfo.Node node, TextureSet newTextures, LODTextureSet newLODTextures = null) { if (newTextures != null) { if (node.m_material != null) { node.m_material = newTextures.CreateRoadMaterial(node.m_material); } } if (newLODTextures != null) { if (node.m_lodMaterial != null) { node.m_lodMaterial = newLODTextures.CreateRoadMaterial(node.m_lodMaterial); } } return(node); }
public static NetInfo SetAllSegmentsTexture(this NetInfo info, TextureSet newTextures, LODTextureSet newLODTextures = null) { for (var i = 0; i < info.m_segments.Length; i++) { info.m_segments[i].SetTextures(newTextures, newLODTextures); } return(info); }
public static NetInfo.Segment SetTextures(this NetInfo.Segment segment, TextureSet newTextures, LODTextureSet newLODTextures = null) { if (newTextures != null) { if (segment.m_material != null) { segment.m_material = newTextures.CreateRoadMaterial(segment.m_material); segment.m_segmentMaterial = segment.m_material; } } if (newLODTextures != null) { if (segment.m_lodMaterial != null) { segment.m_lodMaterial = newLODTextures.CreateRoadMaterial(segment.m_lodMaterial); } } return(segment); }
public static NetInfo SetAllSegmentsTexture(this NetInfo info, TextureSet newTextures, LODTextureSet newLODTextures = null) { foreach (var segment in info.m_segments) { segment.SetTextures(newTextures, newLODTextures); } return(info); }