Answer
Fungi that lived on land before plants could have lived in the soil and in dead animals, some of which spent some time on or near shore. They could also have lived on the edges of freshwater bodies which would have organisms which, alive or dead, could have served as food sources.
Work Step by Step
If plants are ruled out, there were still other organisms living around the water's edge that could have served as food for fungi.