c# - Unity: Add a font asset option in Custom component -


i creating custom component , need add font asset component 3d text or ui text in unity.i want similar functionality unity default text. can browse font asset etc. dont know how add font asset option in custom inspector. need run application on android.

enter image description here

enter image description here

it's quite easy so. create variable of type font , done. following script work fine:

using unityengine; using system.collections;  public class customcomponent : monobehaviour {     //[serializefield]font font;    public font font; } 

any of above line work fine. commented line preferred when don't want make variable public wants editor. let me know if have further queries.


Comments

Popular posts from this blog

php - Displaying JSON data posts for blog using just the post id -

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

javascript - Angular2 intelliJ config error.. Cannot find module '@angular/core' -