How To Save User Created Custom Object

I have created a Scene that allows me to create simple cards using the UI InputFields and UI Text to create a game object called Card in the scene. What I’m trying to find out is the best way to save the cards GameObject that is created as well as the different data that it contains (Name, Type, Description, etc.)

To start I know that I will be creating the initial cards for the game in this tool, and from what I have been able to find a Scriptable Object would work for me being able to create them, but I also want the users to be able to create their own cards with the editor in the game, and it seems that you can’t use Scriptable Objects the same in a deployment build as you can in the editor sessions (from what I can tell, I don’t know very much about Scriptable Objects just what I could find while trying to answer this question).

The way I would go about doing this would be to create a serializable class that holds all the information needed to create the card. Then when they create a card, populate an instance of the class with all the data and save a serialized copy of the class to persistent storage.

Here is the Save and Load functions I am using to do essentially this. My game has a class called SpecialOffer. These save a list of special offers to persistent storage.

   public void Save()
    {
        string dataPath = string.Format("{0}/SpecialOffers.dat", Application.persistentDataPath);
        BinaryFormatter binaryFormatter = new BinaryFormatter();
        FileStream fileStream;

        try
        {
            if (File.Exists(dataPath))
            {
                File.WriteAllText(dataPath, string.Empty);
                fileStream = File.Open(dataPath, FileMode.Open);
            }
            else
            {
                fileStream = File.Create(dataPath);
            }

            binaryFormatter.Serialize(fileStream, SpecialOfferList);
            fileStream.Close();

            if (Application.platform == RuntimePlatform.WebGLPlayer)
            {
                SyncFiles();
            }
        }
        catch (Exception e)
        {
            Debug.Log("Failed to Save: " + e.Message);
        }
    }

    public void Load()
    {

        string dataPath = string.Format("{0}/SpecialOffers.dat", Application.persistentDataPath);

        try
        {
            if (File.Exists(dataPath))
            {
                BinaryFormatter binaryFormatter = new BinaryFormatter();
                FileStream fileStream = File.Open(dataPath, FileMode.Open);

                SpecialOfferList = (List<SpecialOffer>)binaryFormatter.Deserialize(fileStream);
                fileStream.Close();
            }
        }
        catch (Exception e)
        {
            Debug.Log("Failed to Load: " + e.Message);
        }
    }

Hope this helps,
-Larry