title: Can I Serialize Vector3 in my Save Options file
body: <p>I am working on saving and loading options for a game and I am trying to Serialize a Vector3 but I received this error : </p>
  
  <pre><code>SerializationException: Type UnityEngine.Vector3 is not marked as Serializable.
  </code></pre>
  
  <p>When I look at the documentation I see Vector3 on this list of Serializable types :</p>
  
  <pre><code>Serializable types are:
  - Some built-in types like Vector2, Vector3, Vector4, Quaternion, Matrix4x4, Color, Rect, LayerMask.
  </code></pre>
  
  <p>My code is :</p>
  
  <pre><code>public Options_Settings GameOptions { get; private set; }
  
  public void SaveOptionSettings(){
      // Create the Binary Formatter.
      BinaryFormatter bf = new BinaryFormatter();
      // Stream the file with a File Stream. (Note that File.Create() 'Creates' or 'Overwrites' a file.)
      FileStream file = File.Create(Application.persistentDataPath + "/OptionsInfo.dat");
      // Serialize the file so the contents cannot be manipulated.
      bf.Serialize(file, GameOptions);  // &lt;---- Error is here
      // Close the file to prevent any corruptions
      file.Close();
  }
  </code></pre>
  
  <p>My Options_Settings :</p>
  
  <pre><code>using UnityEngine;
  using System;
  
  [Serializable]
  public class Options_Settings {
  
  public bool MusicToggle { get; set; }
  public float MusicVolume { get; set; }
  
  public bool SFXToggle { get; set; }
  public float SFXVolume { get; set; }
  
  public Vector3 UIOneScaling { get; set; }
  public Vector3 UITwoScaling { get; set; }
  public Vector3 UIThreeScaling { get; set; }
  
  
  public void Default () {
  
      MusicToggle = true;
      MusicVolume = 0.5f;
  
      SFXToggle = true;
      SFXVolume = 0.5f;
  
      UIOneScaling = Vector3.one;
      UITwoScaling = Vector3.one;
      UIThreeScaling = Vector3.one;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I know I can make a workaround and just make 3 floats for each vector and pass them around that way but I want to understand what I am doing wrong since the documentation says I can do Vector3 which would prevent extra coding and doing monotonous acts.</p>