First, if you have a lawyer, they cannot come with you. For some reason, courts think that attorneys will get in the way and prevent people from agreeing to anything. In my experience in family law, that's typically the opposite, as ex-spouses and ex-partners are more likely to bicker about irrelevant issues when their attorney's are not present. This also means that you might be pressured to sign an agreement that you don't understand, so be careful when entering mediation, as you might not like what you agree to.
Second, even if you don't agree on anything, the Mediator will write their recommendation to the judge. Since judges don't like to make decisions about the particulars of custody schedules, they often adopt the Mediator's recommendations. So, while you might not enjoy talking with your ex, it's important to put on a good show for the Mediator, in order to get a more desirable recommendation from them. In this sense, the Mediators serve less like a Mediator and more like a quasi-judge, so it is important to take Mediation very seriously.
There are many flaws with California's system of forced Mediation for custody disputes, but it doesn't seem like the system is changing anytime soon. Thus, it is important to consult with an attorney before you go into mediation, so that you are fully prepared for what is actually going to happen.