Esempio n. 1
0
 public void GenerateMeshTypeRoads(RoadNetworkDescription road, MeshGenerationType roadMeshGenerationType)
 {
     if (roadMeshGenerationType == MeshGenerationType.MeshRoad)
     {
         RoadNetworkMesher.GenerateMesh(road);
     }
     else if (roadMeshGenerationType == MeshGenerationType.MeshLanes)
     {
         RoadNetworkMesher.GenerateLineRenderer(road);
     }
     else if (roadMeshGenerationType == MeshGenerationType.MeshLineRenderer)
     {
         RoadNetworkMesher.GenerateLineRenderer(road);
     }
 }
Esempio n. 2
0
    private void OnGUI()
    {
        UG.BeginVertical();

        chosenMeshGenerationType = (MeshGenerationType)UG.EnumPopup("网格生成类型", chosenMeshGenerationType);
        defaultMaterial          = UG.ObjectField("默认材质", defaultMaterial, typeof(Material), false) as Material;

        switch (chosenMeshGenerationType)
        {
        case MeshGenerationType.Plane: OnPlaneGenerationGUI(); break;

        case MeshGenerationType.Box: OnBoxGenerationGUI(); break;

        case MeshGenerationType.Slope: OnSlopeGenerationGUI(); break;

        case MeshGenerationType.VolumetricFluid: OnVolumetricFluidGenerationGUI(); break;

        default: UG.HelpBox("需要选择一种网格生成类别进行编辑!", MessageType.Warning); break;
        }

        UG.EndVertical();
    }