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.
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
Post a Comment