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; }
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.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); } } if (newLODTextures != null) { if (segment.m_lodMaterial != null) { segment.m_lodMaterial = newLODTextures.CreateRoadMaterial(segment.m_lodMaterial); } } return segment; }
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; }