示例#1
0
 private static List <string> BuildWorld(WorldFileReader reader,
                                         Transform cameraPivot, VoxelArray voxelArray, bool editor)
 {
     try
     {
         return(reader.BuildWorld(cameraPivot, voxelArray, editor));
     }
     catch (MapReadException e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw new MapReadException("An error occurred while reading the file", e);
     }
 }
示例#2
0
    private static List <string> BuildWorld(WorldFileReader reader,
                                            Transform cameraPivot, VoxelArray voxelArray, bool editor)
    {
        if (missingMaterial == null)
        {
            // allowTransparency is true in case the material is used for an overlay, so the alpha value can be adjusted
            missingMaterial       = ResourcesDirectory.MakeCustomMaterial(ColorMode.UNLIT, true);
            missingMaterial.color = Color.magenta;
        }

        try
        {
            return(reader.BuildWorld(cameraPivot, voxelArray, editor));
        }
        catch (MapReadException e)
        {
            throw e;
        }
        catch (Exception e)
        {
            throw new MapReadException("An error occurred while reading the file", e);
        }
    }