Fungi, like animals, are heterotrophs, which means that they need to consume another organism in order to obtain their energy and nutrients. Autotrophs, such as plants, are organisms that can utilize energy from a primary energy source and process nutrients in the environment in their raw form. They are the basis of a food chain and nothing can exist without them. If there are no plants then there needs to be some other type of autotrophic organism for the fungi to feed on. My understanding is that we only know of two autotrophic mechanisms: photosynthesis which uses light and chemosynthesis which uses chemicals. So the pickings are slim unless your world has naturally occurring methane oceans and oxygen or some vast deposits of some other chemicals that can be reacted to release energy (which would probably count as chemosynthesis). The first examples of chemosynthesis we discovered earth react hydrogen with sulphur that comes out of geothermal vents. I think most examples of chemosynthesis that we have found are closely tied to geothermal energy, but my understanding is that these organisms use the chemicals from the geothermal vents rather than the heat from the vent itself. Theoretically, I suppose an organism could evolve to directly use the heat differential from the geothermal energy and I guess these would be thermotrophs. I guess the same is also theoretically possible from the radiation produced from the decay of naturally occurring deposits of radioactive materials which would be radiotrophs I guess. If they use the heat from the decay rather than the radiation itself then these would be thermotrophs.