title: How to load platform specific fonts at runtime
body: <p>I am trying to make the app sets some of the assets based on platform.</p>
  
  <p>First step is to have the font based on OS, Roboto for Android and SanFrancisco for iOS.</p>
  
  <p>Simply said, Unity cannot import font at runtime, quite a bit of a drawback compared to any other cross-platform IDE but we not here to judge. The other solution is to use AssetBundle which for unexplanable reasons fails top work for me...</p>
  
  <p>On top of that, it is not widely conceived to store basic assets like font as something else than font.</p>
  
  <p>So my final solution is this ugly script:</p>
  
  <pre class="lang-cs prettyprint-override"><code>class FontFamily
  {
       [Header("Android")]
       [SerializeField]
       private Font regularAndroid = null;
       [SerializeField]
       private Font boldAndroid = null;
       [SerializeField]
       private Font italicAndroid = null;
       [Header("iOS")]
       [SerializeField]
       private Font regularIOS = null;
       [SerializeField]
       private Font boldIOS = null;
       [SerializeField]
       private Font italicIOS = null;
       public Font Regular
       {
           get
           {
   #if UNITY_ANDROID
               return this.regularAndroid;
   #elif UNITY_IOS
               return this.regularIOS;
   #endif
           }
       }
       public Font Bold
       {
           get
           {
   #if UNITY_ANDROID
               return this.boldAndroid;
   #elif UNITY_IOS
               return this.boldIOS;
   #endif
           }
       }
       public Font Italic
       {
           get
           {
   #if UNITY_ANDROID
               return this.italicAndroid;
   #elif UNITY_IOS
               return this.italicIOS;
   #endif
           }
       }
   }
  </code></pre>
  
  <p>Just looking for a way to improve that, coz in the long run this is not a viable solution. I can't even have the macros on the references as they get lost while switching.</p>
  
  <p>I was thinking of some prebuild script maybe, basically, how do you do that? </p>