How to save custom data types

So I know how to use PlayerPrefs, but that is only built in data types.How do I save the data of an object thats of type of a custom class (each variable has many variables inside of it).

For example, saving an entire transform. Save its position, rotation, current material, scripts attached to it. And what not.

There are multiple ways to achieve this, But the following tutorial will get you started