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; }