There is no general substitute for mushrooms that we know of. Knowing how they are used in the recipe might help us give a more comprehensive answer. In recipes where the mushrooms are just one of a number of ingredients, you might just leave them out, recognizing that they add both flavor and moisture to a dish. If you omit the mushrooms, you might consider adding a bit of savory liquid to compensate. (A lot of recipes call for you to sauté the mushrooms before adding them to the dish, getting rid of their moisture beforehand, in which case adding moisture is not an issue.)

A number of people use mushrooms as a substitute for meat in some recipes, but we doubt you want go in the other direction. In terms of texture, cubed tofu would probably be a good substitute for mushrooms, and, somewhat like mushrooms, tofu would absorb the flavors of your dish. Depending on the recipe, you might want to add a bit more stock, spice, or other flavoring to compensate for the missing mushroom flavor.